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;
#define dictGetEntryKey(he) ((he)->key)
#define dictGetEntryVal(he) ((he)->val)
-#define dictGetHashTableSize(ht) ((ht)->size)
-#define dictGetHashTableUsed(ht) ((ht)->used)
+#define dictSlots(ht) ((ht)->size)
+#define dictSize(ht) ((ht)->used)
/* 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);