X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/cceb0c5b4a24d9027abfc47924d5f93af87034b4..95f68f7b0fc4ffc700361484b6c792a8e03f3a13:/src/redis.c diff --git a/src/redis.c b/src/redis.c index 77dc174d..e3db30f7 100644 --- a/src/redis.c +++ b/src/redis.c @@ -393,7 +393,8 @@ int dictSdsKeyCompare(void *privdata, const void *key1, return memcmp(key1, key2, l1) == 0; } -/* A case insensitive version used for the command lookup table. */ +/* A case insensitive version used for the command lookup table and other + * places where case insensitive non binary-safe comparison is needed. */ int dictSdsKeyCaseCompare(void *privdata, const void *key1, const void *key2) { @@ -508,6 +509,16 @@ dictType dbDictType = { dictRedisObjectDestructor /* val destructor */ }; +/* server.lua_scripts sha (as sds string) -> scripts (as robj) cache. */ +dictType shaScriptObjectDictType = { + dictSdsCaseHash, /* hash function */ + NULL, /* key dup */ + NULL, /* val dup */ + dictSdsKeyCaseCompare, /* key compare */ + dictSdsDestructor, /* key destructor */ + dictRedisObjectDestructor /* val destructor */ +}; + /* Db->expires */ dictType keyptrDictType = { dictSdsHash, /* hash function */