summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2020-04-09 16:25:30 +0200
committerantirez <antirez@gmail.com>2020-04-09 16:25:30 +0200
commit6ad44b76b9238eac119c9168994c9171057f3d47 (patch)
tree8e2297ff8fc59b57743c60240791bb5812a50356
parentd88f52ee7d97c37a1845cf38d259b7900a940c71 (diff)
downloadredis-faster-rdb-loading.tar.gz
Use the special static refcount for stack objects.faster-rdb-loading
-rw-r--r--src/server.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server.h b/src/server.h
index c268f2bee..d0d5ff154 100644
--- a/src/server.h
+++ b/src/server.h
@@ -620,7 +620,7 @@ char *getObjectTypeName(robj*);
* we'll update it when the structure is changed, to avoid bugs like
* bug #85 introduced exactly in this way. */
#define initStaticStringObject(_var,_ptr) do { \
- _var.refcount = 1; \
+ _var.refcount = OBJ_STATIC_REFCOUNT; \
_var.type = OBJ_STRING; \
_var.encoding = OBJ_ENCODING_RAW; \
_var.ptr = _ptr; \