10 #define __AFW_POOL_H__
90 #define afw_pool_create(parent,xctx) \
91 afw_pool_create_debug(parent, xctx, AFW__FILE_LINE__)
149 #ifdef AFW_POOL_DEBUG
150 #define afw_pool_create_multithreaded(parent,xctx) \
151 afw_pool_create_multithreaded_debug(parent, xctx, AFW__FILE_LINE__)
167 #define afw_pool_calloc_type(instance, type, xctx) \
168 (type *) afw_pool_calloc(instance, sizeof(type), xctx)
182 #define afw_pool_malloc_type(instance, type, xctx) \
183 (type *) afw_pool_malloc(instance, sizeof(type), xctx)
186 #ifdef AFW_POOL_DEBUG
188 #undef afw_pool_release
189 #define afw_pool_release(instance,xctx) \
190 afw_pool_release_debug(instance, xctx, AFW__FILE_LINE__)
192 #undef afw_pool_destroy
193 #define afw_pool_destroy(instance,xctx) \
194 afw_pool_destroy_debug(instance, xctx, AFW__FILE_LINE__)
196 #undef afw_pool_add_reference
197 #define afw_pool_add_reference(instance,xctx) \
198 afw_pool_add_reference_debug(instance, xctx, AFW__FILE_LINE__)
200 #undef afw_pool_calloc
201 #define afw_pool_calloc(instance,size,xctx) \
202 afw_pool_calloc_debug(instance, size, xctx, AFW__FILE_LINE__)
204 #undef afw_pool_malloc
205 #define afw_pool_malloc(instance,size,xctx) \
206 afw_pool_malloc_debug(instance, size, xctx, AFW__FILE_LINE__)
209 #define afw_pool_free(instance,size,xctx) \
210 afw_pool_free_debug(instance, size, xctx, AFW__FILE_LINE__)
212 #undef afw_pool_register_cleanup_before
213 #define afw_pool_register_cleanup_before(instance,data,data2,cleanup,xctx) \
214 afw_pool_register_cleanup_before_debug(instance, data, data2, cleanup, \
215 xctx, AFW__FILE_LINE__)
217 #undef afw_pool_deregister_cleanup
218 #define afw_pool_deregister_cleanup(instance,data,data2,cleanup,xctx) \
219 afw_pool_deregister_cleanup_debug(instance, data, data2, cleanup, \
220 xctx, AFW__FILE_LINE__)
#define AFW_BEGIN_DECLARES
#define AFW_DECLARE(type)
Declare a public afw function.
Interfaceafw_interface header.
afw_utf8_octet_t afw_utf8_z_t
NFC normalized UTF-8 null terminated string.
void(* afw_pool_cleanup_function_p_t)(void *data, void *data2, const afw_pool_t *p, afw_xctx_t *xctx)
Typedef for pool cleanup functions.
const afw_pool_t * afw_pool_create(const afw_pool_t *parent, afw_xctx_t *xctx)
Create a new pool.
const afw_pool_t * afw_pool_create_multithreaded(const afw_pool_t *parent, afw_xctx_t *xctx)
Create a new multithreaded pool.
const afw_pool_t * afw_pool_create_multithreaded_debug(const afw_pool_t *parent, afw_xctx_t *xctx, const afw_utf8_z_t *source_z)
Debug version of create a new multithreaded pool.
const afw_pool_t * afw_pool_create_debug(const afw_pool_t *parent, afw_xctx_t *xctx, const afw_utf8_z_t *source_z)
Debug version of create a new pool.
Struct for registered cleanup functions.
afw_pool_cleanup_t * next_cleanup
Next cleanup function.
Interface afw_pool public struct.
Interface afw_xctx public struct.