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
a7122f45
Unverified
Commit
a7122f45
authored
Nov 19, 2019
by
Salvatore Sanfilippo
Committed by
GitHub
Nov 19, 2019
Browse files
Merge pull request #6579 from oranagra/rm_reply_string_opt
Slightly more efficient RM_ReplyWithEmptyString
parents
70016f78
c426bbf3
Changes
1
Show whitespace changes
Inline
Side-by-side
src/module.c
View file @
a7122f45
...
@@ -1389,7 +1389,7 @@ int RM_ReplyWithString(RedisModuleCtx *ctx, RedisModuleString *str) {
...
@@ -1389,7 +1389,7 @@ int RM_ReplyWithString(RedisModuleCtx *ctx, RedisModuleString *str) {
int
RM_ReplyWithEmptyString
(
RedisModuleCtx
*
ctx
)
{
int
RM_ReplyWithEmptyString
(
RedisModuleCtx
*
ctx
)
{
client
*
c
=
moduleGetReplyClient
(
ctx
);
client
*
c
=
moduleGetReplyClient
(
ctx
);
if
(
c
==
NULL
)
return
REDISMODULE_OK
;
if
(
c
==
NULL
)
return
REDISMODULE_OK
;
addReply
BulkCBuffer
(
c
,
""
,
0
);
addReply
(
c
,
shared
.
emptybulk
);
return
REDISMODULE_OK
;
return
REDISMODULE_OK
;
}
}
...
@@ -1404,8 +1404,7 @@ int RM_ReplyWithVerbatimString(RedisModuleCtx *ctx, const char *buf, size_t len)
...
@@ -1404,8 +1404,7 @@ int RM_ReplyWithVerbatimString(RedisModuleCtx *ctx, const char *buf, size_t len)
return
REDISMODULE_OK
;
return
REDISMODULE_OK
;
}
}
/* Reply to the client with a NULL. In the RESP protocol a NULL is encoded
/* Reply to the client with a NULL.
* as the string "$-1\r\n".
*
*
* The function always returns REDISMODULE_OK. */
* The function always returns REDISMODULE_OK. */
int
RM_ReplyWithNull
(
RedisModuleCtx
*
ctx
)
{
int
RM_ReplyWithNull
(
RedisModuleCtx
*
ctx
)
{
...
...
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