Use the special static refcount for stack objects.

This commit is contained in:
antirez 2020-04-09 16:25:30 +02:00
parent d88f52ee7d
commit 6ad44b76b9
1 changed files with 1 additions and 1 deletions

View File

@ -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; \