mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-06 20:13:40 +00:00
reflect: add Value.UnsafePointer method
This was added in Go 1.18.
This commit is contained in:
@@ -59,7 +59,7 @@ func reflectValueEqual(x, y reflect.Value) bool {
|
||||
case reflect.String:
|
||||
return x.String() == y.String()
|
||||
case reflect.Chan, reflect.Ptr, reflect.UnsafePointer:
|
||||
return x.Pointer() == y.Pointer()
|
||||
return x.UnsafePointer() == y.UnsafePointer()
|
||||
case reflect.Array:
|
||||
for i := 0; i < x.Len(); i++ {
|
||||
if !reflectValueEqual(x.Index(i), y.Index(i)) {
|
||||
|
||||
Reference in New Issue
Block a user