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

Function zuiSdsFromValue

src/t_zset.cpp:2242–2252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2240}
2241
2242sds zuiSdsFromValue(zsetopval *val) {
2243 if (val->ele == NULL) {
2244 if (val->estr != NULL) {
2245 val->ele = sdsnewlen((char*)val->estr,val->elen);
2246 } else {
2247 val->ele = sdsfromlonglong(val->ell);
2248 }
2249 val->flags |= OPVAL_DIRTY_SDS;
2250 }
2251 return val->ele;
2252}
2253
2254/* This is different from zuiSdsFromValue since returns a new SDS string
2255 * which is up to the caller to free. */

Callers 3

zuiFindFunction · 0.85
zdiffAlgorithm2Function · 0.85

Calls 2

sdsnewlenFunction · 0.85
sdsfromlonglongFunction · 0.85

Tested by

no test coverage detected