From 777f40117fb41293cb69695993282abd6ec59c1c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 12 Sep 2014 12:26:04 +0100 Subject: [PATCH] Hide the concrete radix trie implementation. --- src/libutil/radix.c | 14 ++++++++++++++ src/libutil/radix.h | 16 +--------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/libutil/radix.c b/src/libutil/radix.c index 3cef2b6e4..79c4883d8 100644 --- a/src/libutil/radix.c +++ b/src/libutil/radix.c @@ -29,6 +29,20 @@ static void * radix_alloc (radix_tree_t * tree); +struct radix_node_s { + radix_node_t *right; + radix_node_t *left; + radix_node_t *parent; + uintptr_t value; + guint32 key; +}; + +struct radix_tree_s { + radix_node_t *root; + size_t size; + rspamd_mempool_t *pool; +}; + radix_tree_t * radix_tree_create (void) { diff --git a/src/libutil/radix.h b/src/libutil/radix.h index cfdefa25b..5b014355e 100644 --- a/src/libutil/radix.h +++ b/src/libutil/radix.h @@ -8,21 +8,7 @@ #define RADIX_NO_VALUE (uintptr_t)-1 typedef struct radix_node_s radix_node_t; - -struct radix_node_s { - radix_node_t *right; - radix_node_t *left; - radix_node_t *parent; - uintptr_t value; - guint32 key; -}; - - -typedef struct { - radix_node_t *root; - size_t size; - rspamd_mempool_t *pool; -} radix_tree_t; +typedef struct radix_tree_s radix_tree_t; typedef gboolean (*radix_tree_traverse_func)(guint32 key, guint32 mask, uintptr_t value, void *user_data); -- 2.39.5