Build the flags associated with the current item returned by the * defragmentation iterator. */
| 2398 | /* Build the flags associated with the current item returned by the |
| 2399 | * defragmentation iterator. */ |
| 2400 | static inline int raxDefragNodeFlags(raxDefragIterator *it, raxNode *node) { |
| 2401 | int flags = 0; |
| 2402 | if (it->items == 1) flags |= RAX_DEFRAG_F_ROOT; |
| 2403 | if (node->iskey) flags |= RAX_DEFRAG_F_KEY; |
| 2404 | if (node->iscompr) flags |= RAX_DEFRAG_F_COMPRESSED; |
| 2405 | return flags; |
| 2406 | } |
| 2407 | |
| 2408 | /* Initialize a defragmentation iterator. Unlike the normal iterator there |
| 2409 | * is no need to seek: the iterator performs a full traversal from the root. */ |