| 240 | } raxDefragFrame; |
| 241 | |
| 242 | typedef struct raxDefragIterator { |
| 243 | /* The following fields describe the current item returned by the |
| 244 | * iterator and can be accessed directly by the caller. */ |
| 245 | int kind; /* RAX_DEFRAG_NODE or RAX_DEFRAG_DATA. */ |
| 246 | int flags; /* Current item flags, see RAX_DEFRAG_F_* macros. */ |
| 247 | rax *rt; /* Radix tree being scanned. */ |
| 248 | unsigned char *key; /* Current key. */ |
| 249 | size_t key_len; /* Current key length. */ |
| 250 | size_t key_max; /* Max key len the current key buffer can hold. */ |
| 251 | size_t size; /* Exact node allocation size, or zero for DATA. */ |
| 252 | void *ptr; /* Current node or data pointer. */ |
| 253 | |
| 254 | /* The following fields are internal iterator state and should not be |
| 255 | * modified by the caller. */ |
| 256 | unsigned char key_static_string[RAX_ITER_STATIC_LEN]; |
| 257 | raxNode *node; /* Current node, or the parent of inline DATA. */ |
| 258 | int node_child; /* Current node child index in its parent, or the |
| 259 | inline leaf child index in 'node'. */ |
| 260 | raxDefragFrame *stack; /* DFS stack used by the iterator. */ |
| 261 | size_t items, maxitems; /* Stack length and capacity. */ |
| 262 | size_t pending_todel; /* Characters to remove after inline DATA events. */ |
| 263 | int eof; /* True if there are no more items to return. */ |
| 264 | raxDefragFrame static_items[RAX_DEFRAG_STATIC_ITEMS]; |
| 265 | } raxDefragIterator; |
| 266 | |
| 267 | /* A special pointer returned for not found items. */ |
| 268 | extern void *raxNotFound; |
nothing calls this directly
no outgoing calls
no test coverage detected