From b1334526d1c333767d2e4fed38067bcc535e3f59 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 8 Jun 2010 18:55:35 +0400 Subject: * Add more logic for dynamic rules * Add documentation for dynamic rules * Add ability to make negations in networks in dynamic rules --- src/mem_pool.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/mem_pool.c') diff --git a/src/mem_pool.c b/src/mem_pool.c index 11f74f2f3..363116ce5 100644 --- a/src/mem_pool.c +++ b/src/mem_pool.c @@ -428,6 +428,23 @@ memory_pool_add_destructor (memory_pool_t * pool, pool_destruct_func func, void } } +void +memory_pool_replace_destructor (memory_pool_t * pool, pool_destruct_func func, void *old_data, void *new_data) +{ + struct _pool_destructors *tmp; + + tmp = pool->destructors; + while (tmp) { + if (tmp->func == func && tmp->data == old_data) { + tmp->func = func; + tmp->data = new_data; + break; + } + tmp = tmp->prev; + } + +} + void memory_pool_delete (memory_pool_t * pool) { -- cgit v1.2.3