Rax library updated.

This commit is contained in:
antirez 2019-11-14 12:48:54 +01:00
parent 0f026af185
commit 8d50a8327e

View File

@ -1673,6 +1673,7 @@ int raxSeek(raxIterator *it, const char *op, unsigned char *ele, size_t len) {
* node, but will be our match, representing the key "f". * node, but will be our match, representing the key "f".
* *
* So in that case, we don't seek backward. */ * So in that case, we don't seek backward. */
it->data = raxGetData(it->node);
} else { } else {
if (gt && !raxIteratorNextStep(it,0)) return 0; if (gt && !raxIteratorNextStep(it,0)) return 0;
if (lt && !raxIteratorPrevStep(it,0)) return 0; if (lt && !raxIteratorPrevStep(it,0)) return 0;
@ -1791,7 +1792,7 @@ int raxCompare(raxIterator *iter, const char *op, unsigned char *key, size_t key
if (eq && key_len == iter->key_len) return 1; if (eq && key_len == iter->key_len) return 1;
else if (lt) return iter->key_len < key_len; else if (lt) return iter->key_len < key_len;
else if (gt) return iter->key_len > key_len; else if (gt) return iter->key_len > key_len;
return 0; else return 0; /* Avoid warning, just 'eq' is handled before. */
} else if (cmp > 0) { } else if (cmp > 0) {
return gt ? 1 : 0; return gt ? 1 : 0;
} else /* (cmp < 0) */ { } else /* (cmp < 0) */ {