unsafe: refer to correct reflect functions

Fixes #2641.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5509043
This commit is contained in:
Andrew Gerrand 2012-01-04 17:14:56 +11:00
parent dfedd34d4f
commit 9d92676f63

View File

@ -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.