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

Function zslFreeLexRange

src/t_zset.cpp:599–604  ·  view source on GitHub ↗

Free a lex range structure, must be called only after zelParseLexRange() * populated the structure with success (C_OK returned). */

Source from the content-addressed store, hash-verified

597/* Free a lex range structure, must be called only after zelParseLexRange()
598 * populated the structure with success (C_OK returned). */
599void zslFreeLexRange(zlexrangespec *spec) {
600 if (spec->min != shared.minstring &&
601 spec->min != shared.maxstring) sdsfree(spec->min);
602 if (spec->max != shared.minstring &&
603 spec->max != shared.maxstring) sdsfree(spec->max);
604}
605
606/* Populate the lex rangespec according to the objects min and max.
607 *

Callers 5

zslParseLexRangeFunction · 0.85
zremrangeGenericCommandFunction · 0.85
zlexcountCommandFunction · 0.85
zrangeGenericCommandFunction · 0.85
RM_ZsetRangeStopFunction · 0.85

Calls 1

sdsfreeFunction · 0.85

Tested by

no test coverage detected