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:
Ayke van Laethem
2024-08-12 13:10:07 +02:00
committed by Ron Evans
parent f188eaf5f9
commit eab1a5d7ec
3 changed files with 14 additions and 82 deletions
-12
View File
@@ -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 {