Browse Source

Allow to get memory pool for radix tree.

tags/1.0.0
Vsevolod Stakhov 8 years ago
parent
commit
11d411e385
2 changed files with 17 additions and 3 deletions
  1. 12
    3
      src/libutil/radix.c
  2. 5
    0
      src/libutil/radix.h

+ 12
- 3
src/libutil/radix.c View 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;
}

+ 5
- 0
src/libutil/radix.h View 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

Loading…
Cancel
Save