From c6b8bd77c0fe00dbc455b39208f15761178160a3 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Fri, 14 Jan 2011 12:07:24 +0100 Subject: Make dictionary functions static and include the .c file --- dict.h | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'dict.h') 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 */ -- cgit v1.2.3