mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
RESP3: addReply*Len() support for RESP2 backward comp.
This commit is contained in:
parent
1ac6926647
commit
e14aabf936
@ -562,23 +562,23 @@ void addReplyArrayLen(client *c, long length) {
|
||||
}
|
||||
|
||||
void addReplyMapLen(client *c, long length) {
|
||||
addReplyAggregateLen(c,length,'%');
|
||||
int prefix = c->resp == 2 ? '*' : '%';
|
||||
addReplyAggregateLen(c,length,prefix);
|
||||
}
|
||||
|
||||
void addReplySetLen(client *c, long length) {
|
||||
addReplyAggregateLen(c,length,'~');
|
||||
int prefix = c->resp == 2 ? '*' : '~';
|
||||
addReplyAggregateLen(c,length,prefix);
|
||||
}
|
||||
|
||||
void addReplyAttributeLen(client *c, long length) {
|
||||
addReplyAggregateLen(c,length,'|');
|
||||
int prefix = c->resp == 2 ? '*' : '|';
|
||||
addReplyAggregateLen(c,length,prefix);
|
||||
}
|
||||
|
||||
void addReplyPushLen(client *c, long length) {
|
||||
addReplyAggregateLen(c,length,'>');
|
||||
}
|
||||
|
||||
void addReplyHelloLen(client *c, long length) {
|
||||
addReplyAggregateLen(c,length,'@');
|
||||
int prefix = c->resp == 2 ? '*' : '>';
|
||||
addReplyAggregateLen(c,length,prefix);
|
||||
}
|
||||
|
||||
/* Create the length prefix of a bulk reply, example: $2234 */
|
||||
|
@ -1456,7 +1456,6 @@ void addReplyMapLen(client *c, long length);
|
||||
void addReplySetLen(client *c, long length);
|
||||
void addReplyAttributeLen(client *c, long length);
|
||||
void addReplyPushLen(client *c, long length);
|
||||
void addReplyHelloLen(client *c, long length);
|
||||
void addReplyHelp(client *c, const char **help);
|
||||
void addReplySubcommandSyntaxError(client *c);
|
||||
void copyClientOutputBuffer(client *dst, client *src);
|
||||
|
Loading…
x
Reference in New Issue
Block a user