summaryrefslogtreecommitdiff
path: root/src/dict.h
diff options
context:
space:
mode:
authororanagra <oran@redislabs.com>2016-12-30 03:37:52 +0200
committeroranagra <oran@redislabs.com>2016-12-30 03:37:52 +0200
commit7aa9e6d2ae1d500d8ba900b239207143993ecc3e (patch)
treeed9d684b562250c09d9570c109f0630554b5af6c /src/dict.h
parent6712bce92c79de5c2caa38e9b597a3fa52fd497f (diff)
downloadredis-7aa9e6d2ae1d500d8ba900b239207143993ecc3e.tar.gz
active memory defragmentation
Diffstat (limited to 'src/dict.h')
-rw-r--r--src/dict.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dict.h b/src/dict.h
index 04b247a25..fcb68d998 100644
--- a/src/dict.h
+++ b/src/dict.h
@@ -95,6 +95,7 @@ typedef struct dictIterator {
} dictIterator;
typedef void (dictScanFunction)(void *privdata, const dictEntry *de);
+typedef void (dictScanBucketFunction)(void *privdata, dictEntry **bucketref);
/* This is the initial size of every hash table */
#define DICT_HT_INITIAL_SIZE 4
@@ -176,7 +177,9 @@ int dictRehash(dict *d, int n);
int dictRehashMilliseconds(dict *d, int ms);
void dictSetHashFunctionSeed(unsigned int initval);
unsigned int dictGetHashFunctionSeed(void);
-unsigned long dictScan(dict *d, unsigned long v, dictScanFunction *fn, void *privdata);
+unsigned long dictScan(dict *d, unsigned long v, dictScanFunction *fn, dictScanBucketFunction *bucketfn, void *privdata);
+unsigned int dictGetHash(dict *d, const void *key);
+dictEntry *dictReplaceKeyPtr(dict *d, const void *oldptr, void *newptr, unsigned int hash);
/* Hash table types */
extern dictType dictTypeHeapStringCopyKey;