diff options
author | dreid <dreid@13f79535-47bb-0310-9956-ffa450edef68> | 2001-06-05 13:22:50 +0000 |
---|---|---|
committer | dreid <dreid@13f79535-47bb-0310-9956-ffa450edef68> | 2001-06-05 13:22:50 +0000 |
commit | d265a7fa4f458f3e60ea06a55501cb5c64d71437 (patch) | |
tree | 5d741727ebcfd650aa9f893122c7580666f9776c /acconfig.h | |
parent | 28538df75e74d8506584bf741bb91b8e9a39b0b2 (diff) | |
download | libapr-d265a7fa4f458f3e60ea06a55501cb5c64d71437.tar.gz |
A couple of changes...
- rename the CLEANUP macros so they make more sense (I hope)
- cntxt -> pool in the lock code and macro's
No functional change.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61702 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'acconfig.h')
-rw-r--r-- | acconfig.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/acconfig.h b/acconfig.h index 35aa1f9b6..8cc5284a4 100644 --- a/acconfig.h +++ b/acconfig.h @@ -70,25 +70,25 @@ /* Macros to deal with using either a pool or an sms * to do memory stuff... */ -#define APR_REGISTER_CLEANUP(struct, data, func, scope) \ - if (struct->cntxt) { \ - apr_pool_cleanup_register(struct->cntxt, data, func, scope); \ +#define APR_CLEANUP_REGISTER(struct, data, func, scope) \ + if (struct->pool) { \ + apr_pool_cleanup_register(struct->pool, data, func, scope); \ } else { \ apr_sms_cleanup_register(struct->mem_sys, APR_CHILD_CLEANUP, \ data, func); \ } -#define APR_REMOVE_CLEANUP(struct, data, func) \ - if (struct->cntxt) { \ - apr_pool_cleanup_kill(struct->cntxt, data, func); \ +#define APR_CLEANUP_REMOVE(struct, data, func) \ + if (struct->pool) { \ + apr_pool_cleanup_kill(struct->pool, data, func); \ } else { \ apr_sms_cleanup_unregister(struct->mem_sys, APR_CHILD_CLEANUP, \ data, func); \ } #define APR_MEM_PSTRDUP(struct, ptr, str) \ - if (struct->cntxt) { \ - ptr = apr_pstrdup(struct->cntxt, str); \ + if (struct->pool) { \ + ptr = apr_pstrdup(struct->pool, str); \ } else { \ size_t len = strlen(str) + 1; \ ptr = (char*) apr_sms_calloc(struct->mem_sys, len); \ @@ -96,15 +96,15 @@ } #define APR_MEM_MALLOC(ptr, struct, type) \ - if (struct->cntxt) { \ - ptr = (type *)apr_palloc(struct->cntxt, sizeof(type)); \ + if (struct->pool) { \ + ptr = (type *)apr_palloc(struct->pool, sizeof(type)); \ } else { \ ptr = (type *)apr_sms_malloc(struct->mem_sys, sizeof(type)); \ } #define APR_MEM_CALLOC(ptr, struct, type) \ - if (struct->cntxt) { \ - ptr = (type *)apr_pcalloc(struct->cntxt, sizeof(type)); \ + if (struct->pool) { \ + ptr = (type *)apr_pcalloc(struct->pool, sizeof(type)); \ } else { \ ptr = (type *)apr_sms_calloc(struct->mem_sys, sizeof(type)); \ } |