MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / ldbRedisProtocolToHuman_MultiBulk

Function ldbRedisProtocolToHuman_MultiBulk

src/scripting.cpp:2392–2410  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2390}
2391
2392char *ldbRedisProtocolToHuman_MultiBulk(sds *o, char *reply) {
2393 char *p = strchr(reply+1,'\r');
2394 long long mbulklen;
2395 int j = 0;
2396
2397 string2ll(reply+1,p-reply-1,&mbulklen);
2398 p += 2;
2399 if (mbulklen == -1) {
2400 *o = sdscatlen(*o,"NULL",4);
2401 return p;
2402 }
2403 *o = sdscatlen(*o,"[",1);
2404 for (j = 0; j < mbulklen; j++) {
2405 p = ldbRedisProtocolToHuman(o,p);
2406 if (j != mbulklen-1) *o = sdscatlen(*o,",",1);
2407 }
2408 *o = sdscatlen(*o,"]",1);
2409 return p;
2410}
2411
2412char *ldbRedisProtocolToHuman_Set(sds *o, char *reply) {
2413 char *p = strchr(reply+1,'\r');

Callers 1

ldbRedisProtocolToHumanFunction · 0.85

Calls 3

sdscatlenFunction · 0.85
ldbRedisProtocolToHumanFunction · 0.85
string2llFunction · 0.70

Tested by

no test coverage detected