aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-09-12 12:26:04 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-09-12 12:26:04 +0100
commit777f40117fb41293cb69695993282abd6ec59c1c (patch)
tree006a4c331234b4b9b5083c9fb3e2c0344b13c025 /src
parentaa48f9df195306f11b0b2a20541c97578a65cfbc (diff)
downloadrspamd-777f40117fb41293cb69695993282abd6ec59c1c.tar.gz
rspamd-777f40117fb41293cb69695993282abd6ec59c1c.zip
Hide the concrete radix trie implementation.
Diffstat (limited to 'src')
-rw-r--r--src/libutil/radix.c14
-rw-r--r--src/libutil/radix.h16
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);