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

Function raxPrev

app/redis-6.2.6/src/rax.c:1711–1721  ·  view source on GitHub ↗

Go to the previous element in the scope of the iterator 'it'. * If EOF (or out of memory) is reached, 0 is returned, otherwise 1 is * returned. In case 0 is returned because of OOM, errno is set to ENOMEM. */

Source from the content-addressed store, hash-verified

1709 * If EOF (or out of memory) is reached, 0 is returned, otherwise 1 is
1710 * returned. In case 0 is returned because of OOM, errno is set to ENOMEM. */
1711int raxPrev(raxIterator *it) {
1712 if (!raxIteratorPrevStep(it,0)) {
1713 errno = ENOMEM;
1714 return 0;
1715 }
1716 if (it->flags & RAX_ITER_EOF) {
1717 errno = 0;
1718 return 0;
1719 }
1720 return 1;
1721}
1722
1723/* Perform a random walk starting in the current position of the iterator.
1724 * Return 0 if the tree is empty or on out of memory. Otherwise 1 is returned

Callers 3

RM_DictPrevCFunction · 0.85
streamGetEdgeIDFunction · 0.85
streamIteratorGetIDFunction · 0.85

Calls 1

raxIteratorPrevStepFunction · 0.85

Tested by

no test coverage detected