diff options
| author | eunhhu <[email protected]> | 2026-09-28 09:40:16 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-28 09:40:16 +0100 |
| commit | cdeee266d3d0f22cd245c6febf69e71a00b1adb6 (patch) | |
| tree | 3fbe630e34db9f721e8a93ba0ea2126383594768 /core/module-list.h | |
| parent | a8232abe41cc168fb1596eb16047133fddd7a9ad (diff) | |
| download | pure-cdeee266d3d0f22cd245c6febf69e71a00b1adb6.tar.gz pure-cdeee266d3d0f22cd245c6febf69e71a00b1adb6.zip | |
Guide a list's inner nodes: items before each child and its first key, searched without branches
Diffstat (limited to 'core/module-list.h')
| -rw-r--r-- | core/module-list.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/module-list.h b/core/module-list.h index b9d5a92..ec7ee10 100644 --- a/core/module-list.h +++ b/core/module-list.h @@ -81,6 +81,10 @@ bool pure_list_next(const PureList *, PureRun *); * field does not order below key (numbers by value, texts by bytes), and * whether that item's field is key. */ size_t pure_list_seek(const PureList *, unsigned field, PureCell key, bool *found); +/* The field a keyed list keeps its items in order of: when it is a number + * field, seek by it reads each level's keys from one node (field -1, or a + * text field: none). ALLOCATION leaves the list searched as if it had none. */ +PureResult pure_list_keyed(PureList *, int field); /* The list's items ordered by field, as a keyed list keeps them: *out is NULL * when they already are, or a new list in that order with moved[position * before] = position after for every item. CONFLICT when two items have the |
