Commit 9d92676f authored by Andrew Gerrand's avatar Andrew Gerrand

unsafe: refer to correct reflect functions

Fixes #2641.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5509043
parent dfedd34d
...@@ -52,7 +52,7 @@ func Unreflect(typ interface{}, addr Pointer) (ret interface{}) ...@@ -52,7 +52,7 @@ func Unreflect(typ interface{}, addr Pointer) (ret interface{})
// New allocates and returns a pointer to memory for a new value of the given type. // New allocates and returns a pointer to memory for a new value of the given type.
// The typ is assumed to hold a pointer to a runtime type. // The typ is assumed to hold a pointer to a runtime type.
// Callers should use reflect.MakeZero instead of invoking unsafe.New directly. // Callers should use reflect.New or reflect.Zero instead of invoking unsafe.New directly.
func New(typ interface{}) Pointer func New(typ interface{}) Pointer
// NewArray allocates and returns a pointer to an array of n elements of the given type. // NewArray allocates and returns a pointer to an array of n elements of the given type.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment