summaryrefslogtreecommitdiff
path: root/libgo/go/reflect
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2015-10-29 17:14:51 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2015-10-29 17:14:51 +0000
commit730f6d14253f7c8f44eff8c03beb5984e2f4c6cf (patch)
tree51c7bcf037fe05935e1479b498e56d84212089b1 /libgo/go/reflect
parent285b1f01acaf962e7a668aed7bab4d609a19fc3b (diff)
compiler, runtime: change type hash/equal to Go funcs
Change the type descriptor hash and equal functions from C code pointers to Go func values. This permits them to be set to a Go function closure. This is in preparation for the Go 1.5, so that we can use a closure for the hash/equal functions returned by the new reflect.ArrayOf function. Reviewed-on: https://go-review.googlesource.com/16485 From-SVN: r229541
Diffstat (limited to 'libgo/go/reflect')
-rw-r--r--libgo/go/reflect/type.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/reflect/type.go b/libgo/go/reflect/type.go
index 7f0c6a85a0d..61b195563b6 100644
--- a/libgo/go/reflect/type.go
+++ b/libgo/go/reflect/type.go
@@ -255,8 +255,8 @@ type rtype struct {
size uintptr
hash uint32 // hash of type; avoids computation in hash tables
- hashfn uintptr // hash function code
- equalfn uintptr // equality function code
+ hashfn func(unsafe.Pointer, uintptr) // hash function
+ equalfn func(unsafe.Pointer, unsafe.Pointer, uintptr) // equality function
gc unsafe.Pointer // garbage collection data
string *string // string form; unnecessary but undeniably useful