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

Function zzlGetScore

src/t_zset.cpp:730–746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

728 }
729
730double zzlGetScore(unsigned char *sptr) {
731 unsigned char *vstr;
732 unsigned int vlen;
733 long long vlong;
734 double score;
735
736 serverAssert(sptr != NULL);
737 serverAssert(ziplistGet(sptr,&vstr,&vlen,&vlong));
738
739 if (vstr) {
740 score = zzlStrtod(vstr,vlen);
741 } else {
742 score = vlong;
743 }
744
745 return score;
746}
747
748/* Return a ziplist element as an SDS string. */
749sds ziplistGetObject(unsigned char *sptr) {

Callers 15

geoGetPointsInRangeFunction · 0.85
zzlIsInRangeFunction · 0.85
zzlFirstInRangeFunction · 0.85
zzlLastInRangeFunction · 0.85
zzlFindFunction · 0.85
zzlInsertFunction · 0.85
zzlDeleteRangeByScoreFunction · 0.85
zsetConvertFunction · 0.85
zuiNextFunction · 0.85
zcountCommandFunction · 0.85

Calls 2

ziplistGetFunction · 0.85
zzlStrtodFunction · 0.85

Tested by

no test coverage detected