typedef struct dict {
dictEntry **table;
dictType *type;
- unsigned int size;
- unsigned int sizemask;
- unsigned int used;
+ unsigned long size;
+ unsigned long sizemask;
+ unsigned long used;
void *privdata;
} dict;
} dictIterator;
/* This is the initial size of every hash table */
-#define DICT_HT_INITIAL_SIZE 16
+#define DICT_HT_INITIAL_SIZE 4
/* ------------------------------- Macros ------------------------------------*/
#define dictFreeEntryVal(ht, entry) \
/* API */
dict *dictCreate(dictType *type, void *privDataPtr);
-int dictExpand(dict *ht, unsigned int size);
+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);