summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>2019-07-17 12:41:17 +0000
committerrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>2019-07-17 12:41:17 +0000
commit256cc05e045046d1a545401713945e591d625a9d (patch)
tree8cac5c30193062b635795f967a1a671753a91c92 /include
parent7151b09f19df9b1248f4de03fe897772b9057908 (diff)
downloadlibapr-256cc05e045046d1a545401713945e591d625a9d.tar.gz
Add empty stubs for APR pool functions, that are
only needed when APR_POOL_DEBUG is defined, but can be aor should be called from app code. Providing stubs allows the app code to stay the same when running with or without debugging APR lib (no need for app recompilation). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1863217 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r--include/apr_pools.h38
1 files changed, 10 insertions, 28 deletions
diff --git a/include/apr_pools.h b/include/apr_pools.h
index f87b90b98..0465495e6 100644
--- a/include/apr_pools.h
+++ b/include/apr_pools.h
@@ -733,18 +733,11 @@ APR_DECLARE(void) apr_pool_cleanup_for_exec(void);
* In this case the caller must call apr_pool_join() to indicate this
* guarantee to the APR_POOL_DEBUG code.
*
- * These functions are only implemented when #APR_POOL_DEBUG is set.
+ * These functions have an empty implementation if APR is compiled
+ * with #APR_POOL_DEBUG not set.
*
* @{
*/
-#if APR_POOL_DEBUG || defined(DOXYGEN)
-/**
- * Guarantee that a subpool has the same lifetime as the parent.
- * @param p The parent pool
- * @param sub The subpool
- */
-APR_DECLARE(void) apr_pool_join(apr_pool_t *p, apr_pool_t *sub)
- __attribute__((nonnull(2)));
/**
* Guarantee that a pool is only used by the current thread.
@@ -758,6 +751,14 @@ APR_DECLARE(void) apr_pool_join(apr_pool_t *p, apr_pool_t *sub)
APR_DECLARE(void) apr_pool_owner_set(apr_pool_t *pool, apr_uint32_t flags);
/**
+ * Guarantee that a subpool has the same lifetime as the parent.
+ * @param p The parent pool
+ * @param sub The subpool
+ */
+APR_DECLARE(void) apr_pool_join(apr_pool_t *p, apr_pool_t *sub)
+ __attribute__((nonnull(2)));
+
+/**
* Find a pool from something allocated in it.
* @param mem The thing allocated in the pool
* @return The pool it is allocated in
@@ -782,25 +783,6 @@ APR_DECLARE(void) apr_pool_lock(apr_pool_t *pool, int flag);
/* @} */
-#else /* APR_POOL_DEBUG or DOXYGEN */
-
-#ifdef apr_pool_join
-#undef apr_pool_join
-#endif
-#define apr_pool_join(a,b)
-
-#ifdef apr_pool_owner_set
-#undef apr_pool_owner_set
-#endif
-#define apr_pool_owner_set(a,b)
-
-#ifdef apr_pool_lock
-#undef apr_pool_lock
-#endif
-#define apr_pool_lock(pool, lock)
-
-#endif /* APR_POOL_DEBUG or DOXYGEN */
-
/** @} */
#ifdef __cplusplus