From: Vsevolod Stakhov Date: Fri, 12 Sep 2014 11:26:04 +0000 (+0100) Subject: Hide the concrete radix trie implementation. X-Git-Tag: 0.7.1~57 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=777f40117fb41293cb69695993282abd6ec59c1c;p=rspamd.git Hide the concrete radix trie implementation. --- 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);