]> source.dussan.org Git - rspamd.git/commitdiff
Hide the concrete radix trie implementation.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 12 Sep 2014 11:26:04 +0000 (12:26 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 12 Sep 2014 11:26:04 +0000 (12:26 +0100)
src/libutil/radix.c
src/libutil/radix.h

index 3cef2b6e461896acb0a63795fd91ecb3fdcb92a8..79c4883d88bac9add7773a1d3b3475d8306042c0 100644 (file)
 
 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)
 {
index cfdefa25bf83e9ddf5e0bf3e6a879cffc59e1262..5b014355ee1d20d89326a14514e32e587d27b4da 100644 (file)
@@ -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);