From 6ad44b76b9238eac119c9168994c9171057f3d47 Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 9 Apr 2020 16:25:30 +0200 Subject: Use the special static refcount for stack objects. --- src/server.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; \ -- cgit v1.2.1