diff options
Diffstat (limited to 'libgo/runtime/go-reflect-map.c')
-rw-r--r-- | libgo/runtime/go-reflect-map.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libgo/runtime/go-reflect-map.c b/libgo/runtime/go-reflect-map.c index 3697537..1ae7c96 100644 --- a/libgo/runtime/go-reflect-map.c +++ b/libgo/runtime/go-reflect-map.c @@ -238,3 +238,12 @@ makemap (const struct __go_map_type *t) __builtin_memcpy (ret, &map, sizeof (void *)); return (uintptr_t) ret; } + +extern _Bool ismapkey (const struct __go_type_descriptor *) + __asm__ (GOSYM_PREFIX "reflect.ismapkey"); + +_Bool +ismapkey (const struct __go_type_descriptor *typ) +{ + return typ != NULL && typ->__hashfn != __go_type_hash_error; +} |