diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2011-01-14 12:07:24 +0100 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2011-01-14 12:07:29 +0100 |
commit | c6b8bd77c0fe00dbc455b39208f15761178160a3 (patch) | |
tree | ea4a1ec60ea778e45c9b9a465599c1194036985a /dict.h | |
parent | 7adfef1680a7e8d93c29c0c15977a95febdcf473 (diff) |
Make dictionary functions static and include the .c file
Diffstat (limited to 'dict.h')
-rw-r--r-- | dict.h | 28 |
1 files changed, 12 insertions, 16 deletions
@@ -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 */ |