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

Function ldbRedisProtocolToHuman_Map

src/scripting.cpp:2428–2444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2426}
2427
2428char *ldbRedisProtocolToHuman_Map(sds *o, char *reply) {
2429 char *p = strchr(reply+1,'\r');
2430 long long mbulklen;
2431 int j = 0;
2432
2433 string2ll(reply+1,p-reply-1,&mbulklen);
2434 p += 2;
2435 *o = sdscatlen(*o,"{",1);
2436 for (j = 0; j < mbulklen; j++) {
2437 p = ldbRedisProtocolToHuman(o,p);
2438 *o = sdscatlen(*o," => ",4);
2439 p = ldbRedisProtocolToHuman(o,p);
2440 if (j != mbulklen-1) *o = sdscatlen(*o,",",1);
2441 }
2442 *o = sdscatlen(*o,"}",1);
2443 return p;
2444}
2445
2446char *ldbRedisProtocolToHuman_Null(sds *o, char *reply) {
2447 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