diff options
author | Ondřej Surý <ondrej@sury.org> | 2011-04-20 15:44:41 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2011-04-20 15:44:41 +0200 |
commit | 50104cc32a498f7517a51c8dc93106c51c7a54b4 (patch) | |
tree | 47af80be259cc7c45d0eaec7d42e61fa38c8e4fb /src/pkg/unsafe/unsafe.go | |
parent | c072558b90f1bbedc2022b0f30c8b1ac4712538e (diff) | |
download | golang-50104cc32a498f7517a51c8dc93106c51c7a54b4.tar.gz |
Imported Upstream version 2011.03.07.1upstream/2011.03.07.1
Diffstat (limited to 'src/pkg/unsafe/unsafe.go')
-rw-r--r-- | src/pkg/unsafe/unsafe.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pkg/unsafe/unsafe.go b/src/pkg/unsafe/unsafe.go index 3a4e30c00..3cd4cff6e 100644 --- a/src/pkg/unsafe/unsafe.go +++ b/src/pkg/unsafe/unsafe.go @@ -41,13 +41,14 @@ func Typeof(i interface{}) (typ interface{}) // Reflect unpacks an interface value into its type and the address of a copy of the // internal value. -func Reflect(i interface{}) (typ interface{}, addr uintptr) +func Reflect(i interface{}) (typ interface{}, addr Pointer) -// Unreflect inverts Reflect: Given a type and a pointer, it returns an empty interface value -// with those contents. The typ is assumed to contain a pointer to a runtime type; -// the type information in the interface{} is ignored, so that, for example, both +// Unreflect inverts Reflect: Given a type and a pointer to a value, it returns an +// empty interface value with contents the type and the value (not the pointer to +// the value). The typ is assumed to contain a pointer to a runtime type; the type +// information in the interface{} is ignored, so that, for example, both // *reflect.StructType and *runtime.StructType can be passed for typ. -func Unreflect(typ interface{}, addr uintptr) (ret interface{}) +func Unreflect(typ interface{}, addr Pointer) (ret interface{}) // 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. |