summaryrefslogtreecommitdiff
path: root/libgo/runtime/go-unsafe-pointer.c
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-29 17:14:51 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-29 17:14:51 +0000
commit09e5769840d85ea7a5b64f1804b7104d6abb4c9d (patch)
tree51c7bcf037fe05935e1479b498e56d84212089b1 /libgo/runtime/go-unsafe-pointer.c
parent758c9897fe1980843ed7f0dfa033bb335110d5e0 (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 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229541 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/runtime/go-unsafe-pointer.c')
-rw-r--r--libgo/runtime/go-unsafe-pointer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libgo/runtime/go-unsafe-pointer.c b/libgo/runtime/go-unsafe-pointer.c
index 71364f511b49..a59ae852185e 100644
--- a/libgo/runtime/go-unsafe-pointer.c
+++ b/libgo/runtime/go-unsafe-pointer.c
@@ -54,9 +54,9 @@ const struct __go_type_descriptor unsafe_Pointer =
/* __hash */
78501163U,
/* __hashfn */
- __go_type_hash_identity,
+ &__go_type_hash_identity_descriptor,
/* __equalfn */
- __go_type_equal_identity,
+ &__go_type_equal_identity_descriptor,
/* __gc */
unsafe_Pointer_gc,
/* __reflection */
@@ -99,9 +99,9 @@ const struct __go_ptr_type pointer_unsafe_Pointer =
/* __hash */
1256018616U,
/* __hashfn */
- __go_type_hash_identity,
+ &__go_type_hash_identity_descriptor,
/* __equalfn */
- __go_type_equal_identity,
+ &__go_type_equal_identity_descriptor,
/* __gc */
unsafe_Pointer_gc,
/* __reflection */