summaryrefslogtreecommitdiff
path: root/hashmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'hashmap.h')
-rw-r--r--hashmap.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/hashmap.h b/hashmap.h
index a8b9e3d..ab7958a 100644
--- a/hashmap.h
+++ b/hashmap.h
@@ -87,4 +87,12 @@ static inline void *hashmap_iter_first(struct hashmap *map,
return hashmap_iter_next(iter);
}
+/* string interning */
+
+extern const void *memintern(const void *data, size_t len);
+static inline const char *strintern(const char *string)
+{
+ return memintern(string, strlen(string));
+}
+
#endif