summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-11-26 16:17:19 +0100
committerantirez <antirez@gmail.com>2018-12-21 11:42:51 +0100
commitd64f16c30ec32445fec2d73f11932f1b1f410a44 (patch)
tree02b220915513c0b3521a1b1888e28f2371d3b86c
parentc58f9b9f7df57e2e33a2e7fefebd63f494962885 (diff)
downloadredis-d64f16c30ec32445fec2d73f11932f1b1f410a44.tar.gz
RESP3: Use new aggregate reply API in t_set.c.
-rw-r--r--src/t_set.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/t_set.c b/src/t_set.c
index f67073fe6..e78957d9b 100644
--- a/src/t_set.c
+++ b/src/t_set.c
@@ -455,7 +455,7 @@ void spopWithCountCommand(client *c) {
robj *propargv[3];
propargv[0] = createStringObject("SREM",4);
propargv[1] = c->argv[1];
- addReplyMultiBulkLen(c,count);
+ addReplySetLen(c,count);
/* Common iteration vars. */
sds sdsele;
@@ -647,7 +647,7 @@ void srandmemberWithCountCommand(client *c) {
* This case is trivial and can be served without auxiliary data
* structures. */
if (!uniq) {
- addReplyMultiBulkLen(c,count);
+ addReplySetLen(c,count);
while(count--) {
encoding = setTypeRandomElement(set,&ele,&llele);
if (encoding == OBJ_ENCODING_INTSET) {
@@ -737,7 +737,7 @@ void srandmemberWithCountCommand(client *c) {
dictIterator *di;
dictEntry *de;
- addReplyMultiBulkLen(c,count);
+ addReplySetLen(c,count);
di = dictGetIterator(d);
while((de = dictNext(di)) != NULL)
addReplyBulk(c,dictGetKey(de));
@@ -833,7 +833,7 @@ void sinterGenericCommand(client *c, robj **setkeys,
* to the output list and save the pointer to later modify it with the
* right length */
if (!dstkey) {
- replylen = addDeferredMultiBulkLength(c);
+ replylen = addReplyDeferredLen(c);
} else {
/* If we have a target key where to store the resulting set
* create this key with an empty set inside */
@@ -911,7 +911,7 @@ void sinterGenericCommand(client *c, robj **setkeys,
signalModifiedKey(c->db,dstkey);
server.dirty++;
} else {
- setDeferredMultiBulkLength(c,replylen,cardinality);
+ setDeferredSetLen(c,replylen,cardinality);
}
zfree(sets);
}
@@ -1057,7 +1057,7 @@ void sunionDiffGenericCommand(client *c, robj **setkeys, int setnum,
/* Output the content of the resulting set, if not in STORE mode */
if (!dstkey) {
- addReplyMultiBulkLen(c,cardinality);
+ addReplySetLen(c,cardinality);
si = setTypeInitIterator(dstset);
while((ele = setTypeNextObject(si)) != NULL) {
addReplyBulkCBuffer(c,ele,sdslen(ele));