From 730f6d14253f7c8f44eff8c03beb5984e2f4c6cf Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 29 Oct 2015 17:14:51 +0000 Subject: 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 --- libgo/runtime/go-unsafe-pointer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libgo/runtime/go-unsafe-pointer.c') 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 */ -- cgit v1.1