Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
6ad44b76
"app/vscode:/vscode.git/clone" did not exist on "6a0599d22ca0c7d0640c9ebcc0d64b3f4e170edf"
Commit
6ad44b76
authored
Apr 09, 2020
by
antirez
Browse files
Use the special static refcount for stack objects.
parent
d88f52ee
Changes
1
Show whitespace changes
Inline
Side-by-side
src/server.h
View file @
6ad44b76
...
@@ -620,7 +620,7 @@ char *getObjectTypeName(robj*);
...
@@ -620,7 +620,7 @@ char *getObjectTypeName(robj*);
* we'll update it when the structure is changed, to avoid bugs like
* we'll update it when the structure is changed, to avoid bugs like
* bug #85 introduced exactly in this way. */
* bug #85 introduced exactly in this way. */
#define initStaticStringObject(_var,_ptr) do { \
#define initStaticStringObject(_var,_ptr) do { \
_var.refcount =
1
; \
_var.refcount =
OBJ_STATIC_REFCOUNT
; \
_var.type = OBJ_STRING; \
_var.type = OBJ_STRING; \
_var.encoding = OBJ_ENCODING_RAW; \
_var.encoding = OBJ_ENCODING_RAW; \
_var.ptr = _ptr; \
_var.ptr = _ptr; \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment