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
14a1cba3
"vscode:/vscode.git/clone" did not exist on "693629585b7a2c2f13890fe7001662545436b9a3"
Commit
14a1cba3
authored
Aug 12, 2013
by
antirez
Browse files
Use precomptued objects for bulk and mbulk prefixes.
parent
004f00bf
Changes
1
Show whitespace changes
Inline
Side-by-side
src/networking.c
View file @
14a1cba3
...
@@ -461,6 +461,9 @@ void addReplyLongLong(redisClient *c, long long ll) {
...
@@ -461,6 +461,9 @@ void addReplyLongLong(redisClient *c, long long ll) {
}
}
void
addReplyMultiBulkLen
(
redisClient
*
c
,
long
length
)
{
void
addReplyMultiBulkLen
(
redisClient
*
c
,
long
length
)
{
if
(
length
<
REDIS_SHARED_BULKHDR_LEN
)
addReply
(
c
,
shared
.
mbulkhdr
[
length
]);
else
addReplyLongLongWithPrefix
(
c
,
length
,
'*'
);
addReplyLongLongWithPrefix
(
c
,
length
,
'*'
);
}
}
...
@@ -483,6 +486,10 @@ void addReplyBulkLen(redisClient *c, robj *obj) {
...
@@ -483,6 +486,10 @@ void addReplyBulkLen(redisClient *c, robj *obj) {
len
++
;
len
++
;
}
}
}
}
if
(
len
<
REDIS_SHARED_BULKHDR_LEN
)
addReply
(
c
,
shared
.
bulkhdr
[
len
]);
else
addReplyLongLongWithPrefix
(
c
,
len
,
'$'
);
addReplyLongLongWithPrefix
(
c
,
len
,
'$'
);
}
}
...
...
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