From 058f3f3af1f3f15d2dacc04df8bc339301cf3a7c Mon Sep 17 00:00:00 2001 From: arf20 Date: Mon, 1 Dec 2025 09:06:43 +0100 Subject: add index lookup --- index.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'index.h') diff --git a/index.h b/index.h index 7ae54c9..d640090 100644 --- a/index.h +++ b/index.h @@ -40,11 +40,15 @@ typedef struct { typedef struct map_s *index_t; +typedef struct { + const node_data_t **results; + size_t size, capacity; +} results_t; + int index_init(); void index_deinit(); index_t index_new(size_t icapacity, const char *root); -int index_lookup(index_t index, lookup_type_t type, const char *query, - const node_data_t **results); +results_t index_lookup(index_t index, lookup_type_t type, const char *query); void index_destroy(index_t index); #endif /* _INDEX_H */ -- cgit v1.2.3