MCPcopy Create free account
hub / github.com/F-Stack/f-stack / quicklistPop

Function quicklistPop

app/redis-6.2.6/src/quicklist.c:1419–1435  ·  view source on GitHub ↗

Default pop function * * Returns malloc'd value from quicklist */

Source from the content-addressed store, hash-verified

1417 *
1418 * Returns malloc'd value from quicklist */
1419int quicklistPop(quicklist *quicklist, int where, unsigned char **data,
1420 unsigned int *sz, long long *slong) {
1421 unsigned char *vstr;
1422 unsigned int vlen;
1423 long long vlong;
1424 if (quicklist->count == 0)
1425 return 0;
1426 int ret = quicklistPopCustom(quicklist, where, &vstr, &vlen, &vlong,
1427 _quicklistSaver);
1428 if (data)
1429 *data = vstr;
1430 if (slong)
1431 *slong = vlong;
1432 if (sz)
1433 *sz = vlen;
1434 return ret;
1435}
1436
1437/* Wrapper to allow argument-based switching between HEAD/TAIL pop */
1438void quicklistPush(quicklist *quicklist, void *value, const size_t sz,

Callers 1

quicklistTestFunction · 0.85

Calls 1

quicklistPopCustomFunction · 0.85

Tested by

no test coverage detected