aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/go-unsafe-pointer.c
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/runtime/go-unsafe-pointer.c
parent285b1f01acaf962e7a668aed7bab4d609a19fc3b (diff)
downloadgcc-730f6d14253f7c8f44eff8c03beb5984e2f4c6cf.zip
gcc-730f6d14253f7c8f44eff8c03beb5984e2f4c6cf.tar.gz
gcc-730f6d14253f7c8f44eff8c03beb5984e2f4c6cf.tar.bz2
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/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 71364f5..a59ae85 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 */