summaryrefslogtreecommitdiff
path: root/dict.h
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2011-01-14 12:07:24 +0100
committerPieter Noordhuis <pcnoordhuis@gmail.com>2011-01-14 12:07:29 +0100
commitc6b8bd77c0fe00dbc455b39208f15761178160a3 (patch)
treeea4a1ec60ea778e45c9b9a465599c1194036985a /dict.h
parent7adfef1680a7e8d93c29c0c15977a95febdcf473 (diff)
Make dictionary functions static and include the .c file
Diffstat (limited to 'dict.h')
-rw-r--r--dict.h28
1 files changed, 12 insertions, 16 deletions
diff --git a/dict.h b/dict.h
index 81fa000..95fcd28 100644
--- a/dict.h
+++ b/dict.h
@@ -1,4 +1,4 @@
-/* Hash Tables Implementation.
+/* Hash table implementation.
*
* This file implements in memory hash tables with insert/del/replace/find/
* get-random-element operations. Hash tables will auto resize if needed
@@ -111,20 +111,16 @@ typedef struct dictIterator {
#define dictSize(ht) ((ht)->used)
/* API */
-dict *dictCreate(dictType *type, void *privDataPtr);
-int dictExpand(dict *ht, unsigned long size);
-int dictAdd(dict *ht, void *key, void *val);
-int dictReplace(dict *ht, void *key, void *val);
-int dictDelete(dict *ht, const void *key);
-int dictDeleteNoFree(dict *ht, const void *key);
-void dictRelease(dict *ht);
-dictEntry * dictFind(dict *ht, const void *key);
-int dictResize(dict *ht);
-dictIterator *dictGetIterator(dict *ht);
-dictEntry *dictNext(dictIterator *iter);
-void dictReleaseIterator(dictIterator *iter);
-dictEntry *dictGetRandomKey(dict *ht);
-unsigned int dictGenHashFunction(const unsigned char *buf, int len);
-void dictEmpty(dict *ht);
+static unsigned int dictGenHashFunction(const unsigned char *buf, int len);
+static dict *dictCreate(dictType *type, void *privDataPtr);
+static int dictExpand(dict *ht, unsigned long size);
+static int dictAdd(dict *ht, void *key, void *val);
+static int dictReplace(dict *ht, void *key, void *val);
+static int dictDelete(dict *ht, const void *key);
+static void dictRelease(dict *ht);
+static dictEntry * dictFind(dict *ht, const void *key);
+static dictIterator *dictGetIterator(dict *ht);
+static dictEntry *dictNext(dictIterator *iter);
+static void dictReleaseIterator(dictIterator *iter);
#endif /* __DICT_H */