[strings] fixing and simplifying string tree iterator. This version is inspired by Python's itertools.product (itertoolsmodule.c has so many goodies)
This commit is contained in:
@@ -266,12 +266,8 @@ void string_tree_destroy(string_tree_t *self);
|
||||
|
||||
typedef struct string_tree_iterator {
|
||||
string_tree_t *tree;
|
||||
bool single_path;
|
||||
uint32_t *path;
|
||||
uint32_t *num_alternatives;
|
||||
uint32_t num_tokens;
|
||||
uint32_t cursor;
|
||||
int8_t direction; // 1 or -1
|
||||
uint32_t remaining;
|
||||
} string_tree_iterator_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user