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

Function createZsetObject

src/object.cpp:290–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288}
289
290robj *createZsetObject(void) {
291 zset *zs = (zset*)zmalloc(sizeof(*zs), MALLOC_SHARED);
292 robj *o;
293
294 zs->dict = dictCreate(&zsetDictType,NULL);
295 zs->zsl = zslCreate();
296 o = createObject(OBJ_ZSET,zs);
297 o->encoding = OBJ_ENCODING_SKIPLIST;
298 return o;
299}
300
301robj *createZsetZiplistObject(void) {
302 unsigned char *zl = ziplistNew();

Callers 5

rdbLoadObjectFunction · 0.85
georadiusGenericFunction · 0.85
zsetDupFunction · 0.85
zaddGenericCommandFunction · 0.85

Calls 4

zmallocFunction · 0.85
zslCreateFunction · 0.85
createObjectFunction · 0.85
dictCreateFunction · 0.70

Tested by

no test coverage detected