MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ldbRedisProtocolToHuman_Map

Function ldbRedisProtocolToHuman_Map

app/redis-6.2.6/src/scripting.c:2405–2421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2403}
2404
2405char *ldbRedisProtocolToHuman_Map(sds *o, char *reply) {
2406 char *p = strchr(reply+1,'\r');
2407 long long mbulklen;
2408 int j = 0;
2409
2410 string2ll(reply+1,p-reply-1,&mbulklen);
2411 p += 2;
2412 *o = sdscatlen(*o,"{",1);
2413 for (j = 0; j < mbulklen; j++) {
2414 p = ldbRedisProtocolToHuman(o,p);
2415 *o = sdscatlen(*o," => ",4);
2416 p = ldbRedisProtocolToHuman(o,p);
2417 if (j != mbulklen-1) *o = sdscatlen(*o,",",1);
2418 }
2419 *o = sdscatlen(*o,"}",1);
2420 return p;
2421}
2422
2423char *ldbRedisProtocolToHuman_Null(sds *o, char *reply) {
2424 char *p = strchr(reply+1,'\r');

Callers 1

ldbRedisProtocolToHumanFunction · 0.85

Calls 4

strchrFunction · 0.85
sdscatlenFunction · 0.85
ldbRedisProtocolToHumanFunction · 0.85
string2llFunction · 0.70

Tested by

no test coverage detected