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

Function zzlDelete

src/t_zset.cpp:1025–1032  ·  view source on GitHub ↗

Delete (element,score) pair from ziplist. Use local copy of eptr because we * don't want to modify the one given as argument. */

Source from the content-addressed store, hash-verified

1023/* Delete (element,score) pair from ziplist. Use local copy of eptr because we
1024 * don't want to modify the one given as argument. */
1025unsigned char *zzlDelete(unsigned char *zl, unsigned char *eptr) {
1026 unsigned char *p = eptr;
1027
1028 /* TODO: add function to ziplist API to delete N elements from offset. */
1029 zl = ziplistDelete(zl,&p);
1030 zl = ziplistDelete(zl,&p);
1031 return zl;
1032}
1033
1034unsigned char *zzlInsertAt(unsigned char *zl, unsigned char *eptr, sds ele, double score) {
1035 unsigned char *sptr;

Callers 2

zsetAddFunction · 0.85
zsetDelFunction · 0.85

Calls 1

ziplistDeleteFunction · 0.85

Tested by

no test coverage detected