Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
t9001: style modernisation phase #1
[gitweb.git]
/
hashmap.h
diff --git
a/hashmap.h
b/hashmap.h
index a8b9e3dc8c9a49869191e33cfa9e974b6f11e3d1..ab7958ae333bcc635ba2ac8e40ee8aa6d8814ab4 100644
(file)
--- 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