You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by st...@apache.org on 2008/07/11 19:51:17 UTC

svn commit: r676037 - /apr/apr/trunk/include/apr_pools.h

Author: striker
Date: Fri Jul 11 10:51:16 2008
New Revision: 676037

URL: http://svn.apache.org/viewvc?rev=676037&view=rev
Log:
Pools: Documentation update.  #define tweaks.

* include/apr_pools.h
  (apr_pool_create_unmanaged_ex): Update docstring.  Reflow, removing
   speling error.  Word warning stronger.
  (apr_pool_create_core_ex, apr_pool_create_core): Update #defines to
   use apr_pool_create_unmanaged instead of the core counterparts.

Modified:
    apr/apr/trunk/include/apr_pools.h

Modified: apr/apr/trunk/include/apr_pools.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_pools.h?rev=676037&r1=676036&r2=676037&view=diff
==============================================================================
--- apr/apr/trunk/include/apr_pools.h (original)
+++ apr/apr/trunk/include/apr_pools.h Fri Jul 11 10:51:16 2008
@@ -200,12 +200,13 @@
  * Create a new unmanaged pool.
  * @param newpool The pool we have just created.
  * @param abort_fn A function to use if the pool cannot allocate more memory.
- * @param allocator The allocator to use with the new pool.  If NULL the
+ * @param allocator The allocator to use with the new pool.  If NULL a
  *        new allocator will be crated with newpool as owner.
- * @remark Unmanaged pool is special pool that does not have parent pool
- *         and is NOT destroyed upon apr_terminate call.
- *         It must be explicitly destroyed by calling apr_pool_destroy,
- *         otherwise the memory will leek.
+ * @remark An unmanaged pool is a special pool without a parent; it will
+ *         NOT be destroyed upon apr_terminate.  It must be explicitly
+ *         destroyed by calling apr_pool_destroy, to prevent memory leaks.
+ *         Use of this function is discouraged, think twice about whether
+ *         you really really need it.
  */
 APR_DECLARE(apr_status_t) apr_pool_create_unmanaged_ex(apr_pool_t **newpool,
                                                    apr_abortfunc_t abort_fn,
@@ -270,7 +271,7 @@
 
 #if APR_POOL_DEBUG
 #define apr_pool_create_core_ex(newpool, abort_fn, allocator)  \
-    apr_pool_create_core_ex_debug(newpool, abort_fn, allocator, \
+    apr_pool_create_unmanaged_ex_debug(newpool, abort_fn, allocator, \
                                   APR_POOL__FILE_LINE__)
 
 #define apr_pool_create_unmanaged_ex(newpool, abort_fn, allocator)  \
@@ -311,14 +312,14 @@
 #else
 #if APR_POOL_DEBUG
 #define apr_pool_create_core(newpool) \
-    apr_pool_create_core_ex_debug(newpool, NULL, NULL, \
+    apr_pool_create_unmanaged_ex_debug(newpool, NULL, NULL, \
                                   APR_POOL__FILE_LINE__)
 #define apr_pool_create_unmanaged(newpool) \
     apr_pool_create_unmanaged_ex_debug(newpool, NULL, NULL, \
                                   APR_POOL__FILE_LINE__)
 #else
 #define apr_pool_create_core(newpool) \
-    apr_pool_create_core_ex(newpool, NULL, NULL)
+    apr_pool_create_unmanaged_ex(newpool, NULL, NULL)
 #define apr_pool_create_unmanaged(newpool) \
     apr_pool_create_unmanaged_ex(newpool, NULL, NULL)
 #endif