X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/3305306f0933bdfbd958cb12bd559636d50e4dc7..e054afda908d6043acce66824e51a86bb9e0ba36:/dict.h?ds=sidebyside diff --git a/dict.h b/dict.h index 2e58fd84..bd935d5f 100644 --- a/dict.h +++ b/dict.h @@ -60,9 +60,9 @@ typedef struct dictType { 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; @@ -73,7 +73,7 @@ typedef struct dictIterator { } 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) \ @@ -112,7 +112,7 @@ typedef struct dictIterator { /* 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);