Commit 560e6787 authored by antirez's avatar antirez
Browse files

Clustered dict.c entries WIP.

parent 0d179d17
...@@ -52,9 +52,13 @@ typedef struct dictEntry { ...@@ -52,9 +52,13 @@ typedef struct dictEntry {
int64_t s64; int64_t s64;
double d; double d;
} v; } v;
struct dictEntry *next;
} dictEntry; } dictEntry;
typedef struct dictEntrySlot {
unsigned long numentries;
dictEntry *entries;
} dictEntrySlot;
typedef struct dictType { typedef struct dictType {
unsigned int (*hashFunction)(const void *key); unsigned int (*hashFunction)(const void *key);
void *(*keyDup)(void *privdata, const void *key); void *(*keyDup)(void *privdata, const void *key);
...@@ -67,7 +71,7 @@ typedef struct dictType { ...@@ -67,7 +71,7 @@ typedef struct dictType {
/* This is our hash table structure. Every dictionary has two of this as we /* This is our hash table structure. Every dictionary has two of this as we
* implement incremental rehashing, for the old to the new table. */ * implement incremental rehashing, for the old to the new table. */
typedef struct dictht { typedef struct dictht {
dictEntry **table; dictEntrySlot **table;
unsigned long size; unsigned long size;
unsigned long sizemask; unsigned long sizemask;
unsigned long used; unsigned long used;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment