diff options
author | gstein <gstein@13f79535-47bb-0310-9956-ffa450edef68> | 2001-11-09 17:50:48 +0000 |
---|---|---|
committer | gstein <gstein@13f79535-47bb-0310-9956-ffa450edef68> | 2001-11-09 17:50:48 +0000 |
commit | 3aa54e62b9202aace7f5f6202e9b194676fbbf84 (patch) | |
tree | 06ca4e6dc62317219d25ed1a804b4ced5f8671b2 | |
parent | 21ccb55b2a219b86b2cee7f83a472cdfc37893a6 (diff) | |
download | libapr-3aa54e62b9202aace7f5f6202e9b194676fbbf84.tar.gz |
Constify the pool accessor functions. Use the DECLARE_ACCESSOR macro
for the apr_hash_t, rather than writing it out explicitly (and
incorrectly).
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62492 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | include/apr_hash.h | 3 | ||||
-rw-r--r-- | include/apr_pools.h | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/apr_hash.h b/include/apr_hash.h index 345a593b3..2467886a8 100644 --- a/include/apr_hash.h +++ b/include/apr_hash.h @@ -198,7 +198,8 @@ APR_DECLARE(apr_hash_t *) apr_hash_overlay(apr_pool_t *p, * was created in * @param hash the hash table in question */ -APR_DECLARE(apr_pool_t *) apr_hash_pool_get(apr_hash_t *hash); +APR_POOL_DECLARE_ACCESSOR(hash); + /** @} */ #ifdef __cplusplus } diff --git a/include/apr_pools.h b/include/apr_pools.h index 6bd94e230..6e9a5d73f 100644 --- a/include/apr_pools.h +++ b/include/apr_pools.h @@ -446,13 +446,13 @@ APR_DECLARE(void) apr_pool_cleanup_for_exec(void); */ #define APR_POOL_DECLARE_ACCESSOR(typename) \ APR_DECLARE(apr_pool_t *) apr_##typename##_pool_get \ - (apr_##typename##_t *ob) + (const apr_##typename##_t *ob) #define APR_POOL_IMPLEMENT_ACCESSOR(typename) \ APR_POOL_IMPLEMENT_ACCESSOR_X(typename, pool) #define APR_POOL_IMPLEMENT_ACCESSOR_X(typename, fieldname) \ APR_DECLARE(apr_pool_t *) apr_##typename##_pool_get \ - (apr_##typename##_t *ob) { return ob->fieldname; } + (const apr_##typename##_t *ob) { return ob->fieldname; } /* used to guarantee to the apr_pool_t debugging code that the sub apr_pool_t * will not be destroyed before the parent pool */ |