Initialize a Rax iterator. This call should be performed a single time * to initialize the iterator, and must be followed by a raxSeek() call, * otherwise the raxPrev()/raxNext() functions will just return EOF. */
| 1256 | * to initialize the iterator, and must be followed by a raxSeek() call, |
| 1257 | * otherwise the raxPrev()/raxNext() functions will just return EOF. */ |
| 1258 | void raxStart(raxIterator *it, rax *rt) { |
| 1259 | it->flags = RAX_ITER_EOF; /* No crash if the iterator is not seeked. */ |
| 1260 | it->rt = rt; |
| 1261 | it->key_len = 0; |
| 1262 | it->key = it->key_static_string; |
| 1263 | it->key_max = RAX_ITER_STATIC_LEN; |
| 1264 | it->data = NULL; |
| 1265 | it->node_cb = NULL; |
| 1266 | raxStackInit(&it->stack); |
| 1267 | } |
| 1268 | |
| 1269 | /* Append characters at the current key string of the iterator 'it'. This |
| 1270 | * is a low level function used to implement the iterator, not callable by |
no test coverage detected