Browse Source

reflect: add UnsafeAddr()

pull/3548/head
Damian Gryski 2 years ago
committed by Ayke
parent
commit
fb394c7685
  1. 4
      src/reflect/value.go

4
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
}

Loading…
Cancel
Save