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

Function zzlNext

src/t_zset.cpp:791–806  ·  view source on GitHub ↗

Move to next entry based on the values in eptr and sptr. Both are set to * NULL when there is no next entry. */

Source from the content-addressed store, hash-verified

789/* Move to next entry based on the values in eptr and sptr. Both are set to
790 * NULL when there is no next entry. */
791void zzlNext(unsigned char *zl, unsigned char **eptr, unsigned char **sptr) {
792 unsigned char *_eptr, *_sptr;
793 serverAssert(*eptr != NULL && *sptr != NULL);
794
795 _eptr = ziplistNext(zl,*sptr);
796 if (_eptr != NULL) {
797 _sptr = ziplistNext(zl,_eptr);
798 serverAssert(_sptr != NULL);
799 } else {
800 /* No next entry. */
801 _sptr = NULL;
802 }
803
804 *eptr = _eptr;
805 *sptr = _sptr;
806}
807
808/* Move to the previous entry based on the values in eptr and sptr. Both are
809 * set to NULL when there is no next entry. */

Callers 10

geoGetPointsInRangeFunction · 0.85
zsetConvertFunction · 0.85
zsetRankFunction · 0.85
zcountCommandFunction · 0.85
zlexcountCommandFunction · 0.85
xorObjectDigestFunction · 0.85
rewriteSortedSetObjectFunction · 0.85

Calls 1

ziplistNextFunction · 0.85

Tested by

no test coverage detected