aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/map.c4
-rw-r--r--src/libutil/radix.c4
-rw-r--r--src/libutil/radix.h22
3 files changed, 16 insertions, 14 deletions
diff --git a/src/libutil/map.c b/src/libutil/map.c
index 13af9df7b..7d0313d95 100644
--- a/src/libutil/map.c
+++ b/src/libutil/map.c
@@ -917,7 +917,7 @@ read_radix_list (rspamd_mempool_t * pool,
struct map_cb_data *data)
{
if (data->cur_data == NULL) {
- data->cur_data = radix_tree_create_compressed ();
+ data->cur_data = radix_create_compressed ();
}
return abstract_parse_list (pool,
chunk,
@@ -930,6 +930,6 @@ void
fin_radix_list (rspamd_mempool_t * pool, struct map_cb_data *data)
{
if (data->prev_data) {
- radix_tree_destroy_compressed (data->prev_data);
+ radix_destroy_compressed (data->prev_data);
}
}
diff --git a/src/libutil/radix.c b/src/libutil/radix.c
index 40cccb46b..acf276285 100644
--- a/src/libutil/radix.c
+++ b/src/libutil/radix.c
@@ -845,7 +845,7 @@ radix_insert_compressed (radix_compressed_t * tree,
radix_compressed_t *
-radix_tree_create_compressed (void)
+radix_create_compressed (void)
{
radix_compressed_t *tree;
@@ -862,7 +862,7 @@ radix_tree_create_compressed (void)
}
void
-radix_tree_destroy_compressed (radix_compressed_t *tree)
+radix_destroy_compressed (radix_compressed_t *tree)
{
rspamd_mempool_delete (tree->pool);
g_slice_free1 (sizeof (*tree), tree);
diff --git a/src/libutil/radix.h b/src/libutil/radix.h
index f89d30103..38af00b51 100644
--- a/src/libutil/radix.h
+++ b/src/libutil/radix.h
@@ -81,14 +81,7 @@ uintptr_t radix32tree_find (radix_tree_t *tree, guint32 key);
*/
uintptr_t radix32_tree_find_addr (radix_tree_t *tree, rspamd_inet_addr_t *addr);
-/**
- * Find specified address in tree (works for any address)
- * @param tree
- * @param addr
- * @return
- */
-uintptr_t radix_find_compressed_addr (radix_compressed_t *tree,
- rspamd_inet_addr_t *addr);
+
/**
* Traverse via the whole tree calling specified callback
@@ -111,8 +104,17 @@ radix_insert_compressed (radix_compressed_t * tree,
uintptr_t radix_find_compressed (radix_compressed_t * tree, guint8 *key,
gsize keylen);
-void radix_tree_destroy_compressed (radix_compressed_t *tree);
+/**
+ * Find specified address in tree (works for any address)
+ * @param tree
+ * @param addr
+ * @return
+ */
+uintptr_t radix_find_compressed_addr (radix_compressed_t *tree,
+ rspamd_inet_addr_t *addr);
+
+void radix_destroy_compressed (radix_compressed_t *tree);
-radix_compressed_t *radix_tree_create_compressed (void);
+radix_compressed_t *radix_create_compressed (void);
#endif