Remove unused valDup (#443)
Remove the unused value duplicate API from dict. It's unused in the codebase and introduces unnecessary overhead. --------- Signed-off-by: Eran Liberty <eran.liberty@gmail.com>
This commit is contained in:
parent
b95e7c384f
commit
0700c441c6
@ -144,7 +144,6 @@ static inline int defaultClientPort(void) {
|
|||||||
dictType clusterNodesDictType = {
|
dictType clusterNodesDictType = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
@ -157,7 +156,6 @@ dictType clusterNodesDictType = {
|
|||||||
dictType clusterNodesBlackListDictType = {
|
dictType clusterNodesBlackListDictType = {
|
||||||
dictSdsCaseHash, /* hash function */
|
dictSdsCaseHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCaseCompare, /* key compare */
|
dictSdsKeyCaseCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
@ -168,7 +166,6 @@ dictType clusterNodesBlackListDictType = {
|
|||||||
dictType clusterSdsToListType = {
|
dictType clusterSdsToListType = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
dictListDestructor, /* val destructor */
|
dictListDestructor, /* val destructor */
|
||||||
|
@ -986,7 +986,6 @@ void rewriteConfigSentinelOption(struct rewriteConfigState *state);
|
|||||||
dictType optionToLineDictType = {
|
dictType optionToLineDictType = {
|
||||||
dictSdsCaseHash, /* hash function */
|
dictSdsCaseHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCaseCompare, /* key compare */
|
dictSdsKeyCaseCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
dictListDestructor, /* val destructor */
|
dictListDestructor, /* val destructor */
|
||||||
@ -996,7 +995,6 @@ dictType optionToLineDictType = {
|
|||||||
dictType optionSetDictType = {
|
dictType optionSetDictType = {
|
||||||
dictSdsCaseHash, /* hash function */
|
dictSdsCaseHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCaseCompare, /* key compare */
|
dictSdsKeyCaseCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
|
@ -48,6 +48,8 @@
|
|||||||
#include "serverassert.h"
|
#include "serverassert.h"
|
||||||
#include "monotonic.h"
|
#include "monotonic.h"
|
||||||
|
|
||||||
|
#define UNUSED(V) ((void)V)
|
||||||
|
|
||||||
/* Using dictSetResizeEnabled() we make possible to disable
|
/* Using dictSetResizeEnabled() we make possible to disable
|
||||||
* resizing and rehashing of the hash table as needed. This is very important
|
* resizing and rehashing of the hash table as needed. This is very important
|
||||||
* for us, as we use copy-on-write and don't want to move too much memory
|
* for us, as we use copy-on-write and don't want to move too much memory
|
||||||
@ -800,8 +802,9 @@ void dictSetKey(dict *d, dictEntry *de, void *key) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void dictSetVal(dict *d, dictEntry *de, void *val) {
|
void dictSetVal(dict *d, dictEntry *de, void *val) {
|
||||||
|
UNUSED(d);
|
||||||
assert(entryHasValue(de));
|
assert(entryHasValue(de));
|
||||||
de->v.val = d->type->valDup ? d->type->valDup(d, val) : val;
|
de->v.val = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
void dictSetSignedIntegerVal(dictEntry *de, int64_t val) {
|
void dictSetSignedIntegerVal(dictEntry *de, int64_t val) {
|
||||||
|
@ -54,7 +54,6 @@ typedef struct dictType {
|
|||||||
/* Callbacks */
|
/* Callbacks */
|
||||||
uint64_t (*hashFunction)(const void *key);
|
uint64_t (*hashFunction)(const void *key);
|
||||||
void *(*keyDup)(dict *d, const void *key);
|
void *(*keyDup)(dict *d, const void *key);
|
||||||
void *(*valDup)(dict *d, const void *obj);
|
|
||||||
int (*keyCompare)(dict *d, const void *key1, const void *key2);
|
int (*keyCompare)(dict *d, const void *key1, const void *key2);
|
||||||
void (*keyDestructor)(dict *d, void *key);
|
void (*keyDestructor)(dict *d, void *key);
|
||||||
void (*valDestructor)(dict *d, void *obj);
|
void (*valDestructor)(dict *d, void *obj);
|
||||||
|
@ -71,7 +71,6 @@ static uint64_t dictStrCaseHash(const void *key) {
|
|||||||
dictType shaScriptObjectDictType = {
|
dictType shaScriptObjectDictType = {
|
||||||
dictStrCaseHash, /* hash function */
|
dictStrCaseHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCaseCompare, /* key compare */
|
dictSdsKeyCaseCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
dictLuaScriptDestructor, /* val destructor */
|
dictLuaScriptDestructor, /* val destructor */
|
||||||
|
@ -470,7 +470,6 @@ void rememberSlaveKeyWithExpire(serverDb *db, robj *key) {
|
|||||||
static dictType dt = {
|
static dictType dt = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
|
@ -65,7 +65,6 @@ typedef struct functionsLibMetaData {
|
|||||||
dictType engineDictType = {
|
dictType engineDictType = {
|
||||||
dictSdsCaseHash, /* hash function */
|
dictSdsCaseHash, /* hash function */
|
||||||
dictSdsDup, /* key dup */
|
dictSdsDup, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCaseCompare, /* key compare */
|
dictSdsKeyCaseCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
@ -75,7 +74,6 @@ dictType engineDictType = {
|
|||||||
dictType functionDictType = {
|
dictType functionDictType = {
|
||||||
dictSdsCaseHash, /* hash function */
|
dictSdsCaseHash, /* hash function */
|
||||||
dictSdsDup, /* key dup */
|
dictSdsDup, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCaseCompare, /* key compare */
|
dictSdsKeyCaseCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
@ -85,7 +83,6 @@ dictType functionDictType = {
|
|||||||
dictType engineStatsDictType = {
|
dictType engineStatsDictType = {
|
||||||
dictSdsCaseHash, /* hash function */
|
dictSdsCaseHash, /* hash function */
|
||||||
dictSdsDup, /* key dup */
|
dictSdsDup, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCaseCompare, /* key compare */
|
dictSdsKeyCaseCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
engineStatsDispose, /* val destructor */
|
engineStatsDispose, /* val destructor */
|
||||||
@ -95,7 +92,6 @@ dictType engineStatsDictType = {
|
|||||||
dictType libraryFunctionDictType = {
|
dictType libraryFunctionDictType = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
dictSdsDup, /* key dup */
|
dictSdsDup, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
engineFunctionDispose, /* val destructor */
|
engineFunctionDispose, /* val destructor */
|
||||||
@ -105,7 +101,6 @@ dictType libraryFunctionDictType = {
|
|||||||
dictType librariesDictType = {
|
dictType librariesDictType = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
dictSdsDup, /* key dup */
|
dictSdsDup, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
engineLibraryDispose, /* val destructor */
|
engineLibraryDispose, /* val destructor */
|
||||||
|
@ -794,8 +794,9 @@ void kvstoreDictSetKey(kvstore *kvs, int didx, dictEntry *de, void *key) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void kvstoreDictSetVal(kvstore *kvs, int didx, dictEntry *de, void *val) {
|
void kvstoreDictSetVal(kvstore *kvs, int didx, dictEntry *de, void *val) {
|
||||||
dict *d = kvstoreGetDict(kvs, didx);
|
UNUSED(kvs);
|
||||||
dictSetVal(d, de, val);
|
UNUSED(didx);
|
||||||
|
dictSetVal(NULL, de, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
dictEntry *
|
dictEntry *
|
||||||
|
@ -51,7 +51,6 @@ void dictVanillaFree(dict *d, void *val);
|
|||||||
dictType latencyTimeSeriesDictType = {
|
dictType latencyTimeSeriesDictType = {
|
||||||
dictStringHash, /* hash function */
|
dictStringHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictStringKeyCompare, /* key compare */
|
dictStringKeyCompare, /* key compare */
|
||||||
dictVanillaFree, /* key destructor */
|
dictVanillaFree, /* key destructor */
|
||||||
dictVanillaFree, /* val destructor */
|
dictVanillaFree, /* val destructor */
|
||||||
|
@ -11780,7 +11780,6 @@ int dictCStringKeyCompare(dict *d, const void *key1, const void *key2) {
|
|||||||
dictType moduleAPIDictType = {
|
dictType moduleAPIDictType = {
|
||||||
dictCStringKeyHash, /* hash function */
|
dictCStringKeyHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictCStringKeyCompare, /* key compare */
|
dictCStringKeyCompare, /* key compare */
|
||||||
NULL, /* key destructor */
|
NULL, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
@ -11811,7 +11810,6 @@ void moduleInitModulesSystemLast(void) {
|
|||||||
dictType sdsKeyValueHashDictType = {
|
dictType sdsKeyValueHashDictType = {
|
||||||
dictSdsCaseHash, /* hash function */
|
dictSdsCaseHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCaseCompare, /* key compare */
|
dictSdsKeyCaseCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
dictSdsDestructor, /* val destructor */
|
dictSdsDestructor, /* val destructor */
|
||||||
|
@ -430,7 +430,6 @@ void dictInstancesValDestructor(dict *d, void *obj) {
|
|||||||
dictType instancesDictType = {
|
dictType instancesDictType = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
NULL, /* key destructor */
|
NULL, /* key destructor */
|
||||||
dictInstancesValDestructor, /* val destructor */
|
dictInstancesValDestructor, /* val destructor */
|
||||||
@ -444,7 +443,6 @@ dictType instancesDictType = {
|
|||||||
dictType leaderVotesDictType = {
|
dictType leaderVotesDictType = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
NULL, /* key destructor */
|
NULL, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
@ -455,7 +453,6 @@ dictType leaderVotesDictType = {
|
|||||||
dictType renamedCommandsDictType = {
|
dictType renamedCommandsDictType = {
|
||||||
dictSdsCaseHash, /* hash function */
|
dictSdsCaseHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCaseCompare, /* key compare */
|
dictSdsKeyCaseCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
dictSdsDestructor, /* val destructor */
|
dictSdsDestructor, /* val destructor */
|
||||||
|
17
src/server.c
17
src/server.c
@ -424,7 +424,6 @@ int dictResizeAllowed(size_t moreMem, double usedRatio) {
|
|||||||
dictType objectKeyPointerValueDictType = {
|
dictType objectKeyPointerValueDictType = {
|
||||||
dictEncObjHash, /* hash function */
|
dictEncObjHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictEncObjKeyCompare, /* key compare */
|
dictEncObjKeyCompare, /* key compare */
|
||||||
dictObjectDestructor, /* key destructor */
|
dictObjectDestructor, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
@ -436,7 +435,6 @@ dictType objectKeyPointerValueDictType = {
|
|||||||
dictType objectKeyHeapPointerValueDictType = {
|
dictType objectKeyHeapPointerValueDictType = {
|
||||||
dictEncObjHash, /* hash function */
|
dictEncObjHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictEncObjKeyCompare, /* key compare */
|
dictEncObjKeyCompare, /* key compare */
|
||||||
dictObjectDestructor, /* key destructor */
|
dictObjectDestructor, /* key destructor */
|
||||||
dictVanillaFree, /* val destructor */
|
dictVanillaFree, /* val destructor */
|
||||||
@ -447,7 +445,6 @@ dictType objectKeyHeapPointerValueDictType = {
|
|||||||
dictType setDictType = {
|
dictType setDictType = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
@ -460,7 +457,6 @@ dictType setDictType = {
|
|||||||
dictType zsetDictType = {
|
dictType zsetDictType = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
NULL, /* Note: SDS string shared & freed by skiplist */
|
NULL, /* Note: SDS string shared & freed by skiplist */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
@ -471,7 +467,6 @@ dictType zsetDictType = {
|
|||||||
dictType dbDictType = {
|
dictType dbDictType = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
dictObjectDestructor, /* val destructor */
|
dictObjectDestructor, /* val destructor */
|
||||||
@ -482,7 +477,6 @@ dictType dbDictType = {
|
|||||||
dictType dbExpiresDictType = {
|
dictType dbExpiresDictType = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
NULL, /* key destructor */
|
NULL, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
@ -493,7 +487,6 @@ dictType dbExpiresDictType = {
|
|||||||
dictType commandTableDictType = {
|
dictType commandTableDictType = {
|
||||||
dictSdsCaseHash, /* hash function */
|
dictSdsCaseHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCaseCompare, /* key compare */
|
dictSdsKeyCaseCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
@ -504,7 +497,6 @@ dictType commandTableDictType = {
|
|||||||
dictType hashDictType = {
|
dictType hashDictType = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
dictSdsDestructor, /* val destructor */
|
dictSdsDestructor, /* val destructor */
|
||||||
@ -515,7 +507,6 @@ dictType hashDictType = {
|
|||||||
dictType sdsReplyDictType = {
|
dictType sdsReplyDictType = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
NULL, /* key destructor */
|
NULL, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
@ -528,7 +519,6 @@ dictType sdsReplyDictType = {
|
|||||||
dictType keylistDictType = {
|
dictType keylistDictType = {
|
||||||
dictObjHash, /* hash function */
|
dictObjHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictObjKeyCompare, /* key compare */
|
dictObjKeyCompare, /* key compare */
|
||||||
dictObjectDestructor, /* key destructor */
|
dictObjectDestructor, /* key destructor */
|
||||||
dictListDestructor, /* val destructor */
|
dictListDestructor, /* val destructor */
|
||||||
@ -540,7 +530,6 @@ dictType keylistDictType = {
|
|||||||
dictType objToDictDictType = {
|
dictType objToDictDictType = {
|
||||||
dictObjHash, /* hash function */
|
dictObjHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictObjKeyCompare, /* key compare */
|
dictObjKeyCompare, /* key compare */
|
||||||
dictObjectDestructor, /* key destructor */
|
dictObjectDestructor, /* key destructor */
|
||||||
dictDictDestructor, /* val destructor */
|
dictDictDestructor, /* val destructor */
|
||||||
@ -552,7 +541,6 @@ dictType objToDictDictType = {
|
|||||||
dictType modulesDictType = {
|
dictType modulesDictType = {
|
||||||
dictSdsCaseHash, /* hash function */
|
dictSdsCaseHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCaseCompare, /* key compare */
|
dictSdsKeyCaseCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
@ -563,7 +551,6 @@ dictType modulesDictType = {
|
|||||||
dictType migrateCacheDictType = {
|
dictType migrateCacheDictType = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
@ -575,7 +562,6 @@ dictType migrateCacheDictType = {
|
|||||||
dictType stringSetDictType = {
|
dictType stringSetDictType = {
|
||||||
dictCStrCaseHash, /* hash function */
|
dictCStrCaseHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictCStrKeyCaseCompare, /* key compare */
|
dictCStrKeyCaseCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
@ -587,7 +573,6 @@ dictType stringSetDictType = {
|
|||||||
dictType externalStringType = {
|
dictType externalStringType = {
|
||||||
dictCStrCaseHash, /* hash function */
|
dictCStrCaseHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictCStrKeyCaseCompare, /* key compare */
|
dictCStrKeyCaseCompare, /* key compare */
|
||||||
NULL, /* key destructor */
|
NULL, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
@ -599,7 +584,6 @@ dictType externalStringType = {
|
|||||||
dictType sdsHashDictType = {
|
dictType sdsHashDictType = {
|
||||||
dictSdsCaseHash, /* hash function */
|
dictSdsCaseHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCaseCompare, /* key compare */
|
dictSdsKeyCaseCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
dictVanillaFree, /* val destructor */
|
dictVanillaFree, /* val destructor */
|
||||||
@ -610,7 +594,6 @@ dictType sdsHashDictType = {
|
|||||||
dictType clientDictType = {
|
dictType clientDictType = {
|
||||||
dictClientHash, /* hash function */
|
dictClientHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictClientKeyCompare, /* key compare */
|
dictClientKeyCompare, /* key compare */
|
||||||
.no_value = 1 /* no values in this dict */
|
.no_value = 1 /* no values in this dict */
|
||||||
};
|
};
|
||||||
|
@ -2527,7 +2527,6 @@ static void zdiff(zsetopsrc *src, long setnum, zset *dstzset, size_t *maxelelen,
|
|||||||
dictType setAccumulatorDictType = {
|
dictType setAccumulatorDictType = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
NULL, /* key destructor */
|
NULL, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
|
@ -10,7 +10,7 @@ void freeTestCallback(dict *d, void *val) {
|
|||||||
zfree(val);
|
zfree(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
dictType KvstoreDictTestType = {hashTestCallback, NULL, NULL, NULL, freeTestCallback, NULL, NULL};
|
dictType KvstoreDictTestType = {hashTestCallback, NULL, NULL, freeTestCallback, NULL, NULL};
|
||||||
|
|
||||||
char *stringFromInt(int value) {
|
char *stringFromInt(int value) {
|
||||||
char buf[32];
|
char buf[32];
|
||||||
|
@ -1243,7 +1243,6 @@ static int fetchClusterSlotsConfiguration(client c) {
|
|||||||
static dictType dtype = {
|
static dictType dtype = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
NULL, /* key destructor */
|
NULL, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
|
@ -882,7 +882,6 @@ static void cliInitHelp(void) {
|
|||||||
dictType groupsdt = {
|
dictType groupsdt = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
NULL, /* val destructor */
|
NULL, /* val destructor */
|
||||||
@ -3544,7 +3543,6 @@ typedef struct clusterManagerLink {
|
|||||||
static dictType clusterManagerDictType = {
|
static dictType clusterManagerDictType = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
NULL, /* key destructor */
|
NULL, /* key destructor */
|
||||||
dictSdsDestructor, /* val destructor */
|
dictSdsDestructor, /* val destructor */
|
||||||
@ -3554,7 +3552,6 @@ static dictType clusterManagerDictType = {
|
|||||||
static dictType clusterManagerLinkDictType = {
|
static dictType clusterManagerLinkDictType = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
dictSdsDestructor, /* key destructor */
|
dictSdsDestructor, /* key destructor */
|
||||||
dictListDestructor, /* val destructor */
|
dictListDestructor, /* val destructor */
|
||||||
@ -8628,7 +8625,6 @@ void type_free(dict *d, void *val) {
|
|||||||
static dictType typeinfoDictType = {
|
static dictType typeinfoDictType = {
|
||||||
dictSdsHash, /* hash function */
|
dictSdsHash, /* hash function */
|
||||||
NULL, /* key dup */
|
NULL, /* key dup */
|
||||||
NULL, /* val dup */
|
|
||||||
dictSdsKeyCompare, /* key compare */
|
dictSdsKeyCompare, /* key compare */
|
||||||
NULL, /* key destructor (owned by the value)*/
|
NULL, /* key destructor (owned by the value)*/
|
||||||
type_free, /* val destructor */
|
type_free, /* val destructor */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user