summaryrefslogtreecommitdiff
path: root/src/runtime/c/gu
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/c/gu')
-rw-r--r--src/runtime/c/gu/map.c6
-rw-r--r--src/runtime/c/gu/map.h8
2 files changed, 8 insertions, 6 deletions
diff --git a/src/runtime/c/gu/map.c b/src/runtime/c/gu/map.c
index 2ee77bb23..312723f8a 100644
--- a/src/runtime/c/gu/map.c
+++ b/src/runtime/c/gu/map.c
@@ -251,6 +251,12 @@ gu_map_find_key(GuMap* map, const void* key)
return NULL;
}
+bool
+gu_map_has(GuMap* ht, const void* key)
+{
+ size_t idx;
+ return gu_map_lookup(ht, key, &idx);
+}
void*
gu_map_insert(GuMap* map, const void* key)
diff --git a/src/runtime/c/gu/map.h b/src/runtime/c/gu/map.h
index 6523a8057..327d6ea6a 100644
--- a/src/runtime/c/gu/map.h
+++ b/src/runtime/c/gu/map.h
@@ -52,12 +52,8 @@ gu_map_find(GuMap* ht, const void* key);
const void*
gu_map_find_key(GuMap* ht, const void* key);
-static inline bool
-gu_map_has(GuMap* ht, const void* key)
-{
- return gu_map_find_key(ht, key) != NULL;
-}
-
+bool
+gu_map_has(GuMap* ht, const void* key);
void*
gu_map_insert(GuMap* ht, const void* key);