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

Function zuiLongLongFromValue

app/redis-6.2.6/src/t_zset.c:2225–2241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2223}
2224
2225int zuiLongLongFromValue(zsetopval *val) {
2226 if (!(val->flags & OPVAL_DIRTY_LL)) {
2227 val->flags |= OPVAL_DIRTY_LL;
2228
2229 if (val->ele != NULL) {
2230 if (string2ll(val->ele,sdslen(val->ele),&val->ell))
2231 val->flags |= OPVAL_VALID_LL;
2232 } else if (val->estr != NULL) {
2233 if (string2ll((char*)val->estr,val->elen,&val->ell))
2234 val->flags |= OPVAL_VALID_LL;
2235 } else {
2236 /* The long long was already set, flag as valid. */
2237 val->flags |= OPVAL_VALID_LL;
2238 }
2239 }
2240 return val->flags & OPVAL_VALID_LL;
2241}
2242
2243sds zuiSdsFromValue(zsetopval *val) {
2244 if (val->ele == NULL) {

Callers 1

zuiFindFunction · 0.85

Calls 2

sdslenFunction · 0.85
string2llFunction · 0.70

Tested by

no test coverage detected