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. */
| 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. */ |
| 1711 | int 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 |
no test coverage detected