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

Function ldbRedisProtocolToHuman_Set

src/scripting.cpp:2412–2426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2410}
2411
2412char *ldbRedisProtocolToHuman_Set(sds *o, char *reply) {
2413 char *p = strchr(reply+1,'\r');
2414 long long mbulklen;
2415 int j = 0;
2416
2417 string2ll(reply+1,p-reply-1,&mbulklen);
2418 p += 2;
2419 *o = sdscatlen(*o,"~(",2);
2420 for (j = 0; j < mbulklen; j++) {
2421 p = ldbRedisProtocolToHuman(o,p);
2422 if (j != mbulklen-1) *o = sdscatlen(*o,",",1);
2423 }
2424 *o = sdscatlen(*o,")",1);
2425 return p;
2426}
2427
2428char *ldbRedisProtocolToHuman_Map(sds *o, char *reply) {
2429 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