mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 14:03:39 +00:00
reflect, runtime: remove *UnsafePointer wrappers for functions
This was needed in the past because LLVM used typed pointers and there was a mismatch between pointer types. But we've dropped support for typed pointers a while ago so now we can remove these wrappers. This is just a cleanup, it shouldn't have any practical effect.
This commit is contained in:
committed by
Ron Evans
parent
f188eaf5f9
commit
eab1a5d7ec
@@ -148,12 +148,6 @@ func chanLen(c *channel) int {
|
||||
return int(c.bufUsed)
|
||||
}
|
||||
|
||||
// wrapper for use in reflect
|
||||
func chanLenUnsafePointer(p unsafe.Pointer) int {
|
||||
c := (*channel)(p)
|
||||
return chanLen(c)
|
||||
}
|
||||
|
||||
// Return the capacity of this chan, called from the cap builtin.
|
||||
// A nil chan is defined as having capacity 0.
|
||||
//
|
||||
@@ -165,12 +159,6 @@ func chanCap(c *channel) int {
|
||||
return int(c.bufSize)
|
||||
}
|
||||
|
||||
// wrapper for use in reflect
|
||||
func chanCapUnsafePointer(p unsafe.Pointer) int {
|
||||
c := (*channel)(p)
|
||||
return chanCap(c)
|
||||
}
|
||||
|
||||
// resumeRX resumes the next receiver and returns the destination pointer.
|
||||
// If the ok value is true, then the caller is expected to store a value into this pointer.
|
||||
func (ch *channel) resumeRX(ok bool) unsafe.Pointer {
|
||||
|
||||
Reference in New Issue
Block a user