diff --git a/src/reflect/value.go b/src/reflect/value.go index 24cbf288..41807af2 100644 --- a/src/reflect/value.go +++ b/src/reflect/value.go @@ -228,6 +228,10 @@ func (v Value) Addr() Value { } } +func (v Value) UnsafeAddr() uintptr { + return uintptr(v.Addr().UnsafePointer()) +} + func (v Value) CanSet() bool { return v.flags&(valueFlagExported|valueFlagIndirect) == valueFlagExported|valueFlagIndirect }