summaryrefslogtreecommitdiff
path: root/src/server.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-08-04 09:20:55 +0200
committerantirez <antirez@gmail.com>2015-10-01 13:02:24 +0200
commita7c5be18a81c120b4bdeb139072f27c899fe1a4d (patch)
treec7cf812a74ee27d575607a116b6c3fb4cbf91146 /src/server.c
parent86d48efbfd40cba447025c36ac6b0c5507b032fd (diff)
downloadredis-a7c5be18a81c120b4bdeb139072f27c899fe1a4d.tar.gz
Lazyfree: Sorted sets convereted to plain SDS. (several commits squashed)
Diffstat (limited to 'src/server.c')
-rw-r--r--src/server.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server.c b/src/server.c
index bd45e7d29..bbec02967 100644
--- a/src/server.c
+++ b/src/server.c
@@ -554,11 +554,11 @@ dictType setDictType = {
/* Sorted sets hash (note: a skiplist is used in addition to the hash table) */
dictType zsetDictType = {
- dictEncObjHash, /* hash function */
+ dictSdsHash, /* hash function */
NULL, /* key dup */
NULL, /* val dup */
- dictEncObjKeyCompare, /* key compare */
- dictObjectDestructor, /* key destructor */
+ dictSdsKeyCompare, /* key compare */
+ NULL, /* Note: SDS string shared & freed by skiplist */
NULL /* val destructor */
};
@@ -1428,8 +1428,8 @@ void createSharedObjects(void) {
* actually used for their value but as a special object meaning
* respectively the minimum possible string and the maximum possible
* string in string comparisons for the ZRANGEBYLEX command. */
- shared.minstring = createStringObject("minstring",9);
- shared.maxstring = createStringObject("maxstring",9);
+ shared.minstring = sdsnew("minstring");
+ shared.maxstring = sdsnew("maxstring");
}
void initServerConfig(void) {