]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Allow to get memory pool for radix tree.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 3 Sep 2015 15:02:13 +0000 (16:02 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 3 Sep 2015 15:02:13 +0000 (16:02 +0100)
src/libutil/radix.c
src/libutil/radix.h

index 26e4a98c8216f002965a4b010e6ee25c2bf1cc10..a919691da016c42b0a4c4f9b6b69920a60e4adf1 100644 (file)
@@ -675,6 +675,15 @@ radix_get_size (radix_compressed_t *tree)
 
        return 0;
 }
-/*
- * vi:ts=4
- */
+
+
+rspamd_mempool_t *
+radix_get_pool (radix_compressed_t *tree)
+{
+
+       if (tree != NULL) {
+               return tree->pool;
+       }
+
+       return NULL;
+}
index a7ea7f868a3f49686045ef43772c2352b0d50815..4200cf65e289cb4fccbe1c2549b48a28ade9e5c2 100644 (file)
@@ -104,4 +104,9 @@ gboolean radix_add_generic_iplist (const gchar *ip_list,
  */
 gsize radix_get_size (radix_compressed_t *tree);
 
+/**
+ * Returns memory pool associated with the radix tree
+ */
+rspamd_mempool_t* radix_get_pool (radix_compressed_t *tree);
+
 #endif