aboutsummaryrefslogtreecommitdiff
path: root/index.h
diff options
context:
space:
mode:
authorarf20 <aruizfernandez05@gmail.com>2025-12-01 09:06:43 +0100
committerarf20 <aruizfernandez05@gmail.com>2025-12-01 09:06:43 +0100
commit058f3f3af1f3f15d2dacc04df8bc339301cf3a7c (patch)
tree418d2efa004981c7430d5c53f42282b200b612c4 /index.h
parentb1430f0f2d76859eafda9fc6098c3b4876501471 (diff)
downloadarfnet2-search-058f3f3af1f3f15d2dacc04df8bc339301cf3a7c.tar.gz
arfnet2-search-058f3f3af1f3f15d2dacc04df8bc339301cf3a7c.zip
add index lookup
Diffstat (limited to 'index.h')
-rw-r--r--index.h8
1 files changed, 6 insertions, 2 deletions
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 */