Modified: apr/site/trunk/docs/docs/apr/trunk/apr__pools_8h-source.html
URL: http://svn.apache.org/viewvc/apr/site/trunk/docs/docs/apr/trunk/apr__pools_8h-source.html?rev=686480&r1=686479&r2=686480&view=diff
==============================================================================
--- apr/site/trunk/docs/docs/apr/trunk/apr__pools_8h-source.html (original)
+++ apr/site/trunk/docs/docs/apr/trunk/apr__pools_8h-source.html Sat Aug 16 04:43:44 2008
@@ -4,7 +4,7 @@
-
+
@@ -208,558 +208,591 @@
00190
00191 /**00192 * Create a new pool.
-00193 * @param newpool The pool we have just created.
-00194 * @param abort_fn A function to use if the pool cannot allocate more memory.
-00195 * @param allocator The allocator to use with the new pool. If NULL the
-00196 * new allocator will be crated with newpool as owner.
-00197 */
-00198 APR_DECLARE(apr_status_t) apr_pool_create_core_ex(apr_pool_t **newpool,
-00199 apr_abortfunc_t abort_fn,
-00200 apr_allocator_t *allocator);
-00201
-00202 /**
-00203 * Debug version of apr_pool_create_ex.
-00204 * @param newpool @see apr_pool_create.
-00205 * @param parent @see apr_pool_create.
-00206 * @param abort_fn @see apr_pool_create.
-00207 * @param allocator @see apr_pool_create.
-00208 * @param file_line Where the function is called from.
-00209 * This is usually APR_POOL__FILE_LINE__.
-00210 * @remark Only available when APR_POOL_DEBUG is defined.
-00211 * Call this directly if you have you apr_pool_create_ex
-00212 * calls in a wrapper function and wish to override
-00213 * the file_line argument to reflect the caller of
-00214 * your wrapper function. If you do not have
-00215 * apr_pool_create_ex in a wrapper, trust the macro
-00216 * and don't call apr_pool_create_ex_debug directly.
-00217 */
-00218 APR_DECLARE(apr_status_t) apr_pool_create_ex_debug(apr_pool_t **newpool,
-00219 apr_pool_t *parent,
-00220 apr_abortfunc_t abort_fn,
-00221 apr_allocator_t *allocator,
-00222 const char *file_line);
-00223
-00224 #if APR_POOL_DEBUG
-00225 #define apr_pool_create_ex(newpool, parent, abort_fn, allocator) \
-00226 apr_pool_create_ex_debug(newpool, parent, abort_fn, allocator, \
-00227 APR_POOL__FILE_LINE__)
-00228 #endif
-00229
-00230 /**
-00231 * Debug version of apr_pool_create_core_ex.
-00232 * @param newpool @see apr_pool_create.
-00233 * @param abort_fn @see apr_pool_create.
-00234 * @param allocator @see apr_pool_create.
-00235 * @param file_line Where the function is called from.
-00236 * This is usually APR_POOL__FILE_LINE__.
-00237 * @remark Only available when APR_POOL_DEBUG is defined.
-00238 * Call this directly if you have you apr_pool_create_core_ex
-00239 * calls in a wrapper function and wish to override
-00240 * the file_line argument to reflect the caller of
-00241 * your wrapper function. If you do not have
-00242 * apr_pool_create_core_ex in a wrapper, trust the macro
-00243 * and don't call apr_pool_create_core_ex_debug directly.
-00244 */
-00245 APR_DECLARE(apr_status_t) apr_pool_create_core_ex_debug(apr_pool_t **newpool,
-00246 apr_abortfunc_t abort_fn,
-00247 apr_allocator_t *allocator,
-00248 const char *file_line);
-00249
-00250 #if APR_POOL_DEBUG
-00251 #define apr_pool_create_core_ex(newpool, abort_fn, allocator) \
-00252 apr_pool_create_core_ex_debug(newpool, abort_fn, allocator, \
-00253 APR_POOL__FILE_LINE__)
-00254 #endif
-00255
-00256 /**
-00257 * Create a new pool.
-00258 * @param newpool The pool we have just created.
-00259 * @param parent The parent pool. If this is NULL, the new pool is a root
-00260 * pool. If it is non-NULL, the new pool will inherit all
-00261 * of its parent pool's attributes, except the apr_pool_t will
-00262 * be a sub-pool.
-00263 */
-00264 #if defined(DOXYGEN)
-00265 APR_DECLARE(apr_status_t) apr_pool_create(apr_pool_t **newpool,
-00266 apr_pool_t *parent);
-00267 #else
-00268 #if APR_POOL_DEBUG
-00269 #define apr_pool_create(newpool, parent) \
-00270 apr_pool_create_ex_debug(newpool, parent, NULL, NULL, \
-00271 APR_POOL__FILE_LINE__)
-00272 #else
-00273 #define apr_pool_create(newpool, parent) \
-00274 apr_pool_create_ex(newpool, parent, NULL, NULL)
-00275 #endif
-00276 #endif
-00277
-00278 /**
-00279 * Create a new pool.
-00280 * @param newpool The pool we have just created.
-00281 */
-00282 #if defined(DOXYGEN)
-00283 APR_DECLARE(apr_status_t) apr_pool_create_core(apr_pool_t **newpool);
-00284 #else
-00285 #if APR_POOL_DEBUG
-00286 #define apr_pool_create_core(newpool) \
-00287 apr_pool_create_core_ex_debug(newpool, NULL, NULL, \
-00288 APR_POOL__FILE_LINE__)
-00289 #else
-00290 #define apr_pool_create_core(newpool) \
-00291 apr_pool_create_core_ex(newpool, NULL, NULL)
-00292 #endif
-00293 #endif
-00294
-00295 /**
-00296 * Find the pools allocator
-00297 * @param pool The pool to get the allocator from.
-00298 */
-00299 APR_DECLARE(apr_allocator_t *) apr_pool_allocator_get(apr_pool_t *pool);
-00300
-00301 /**
-00302 * Clear all memory in the pool and run all the cleanups. This also destroys all
-00303 * subpools.
-00304 * @param p The pool to clear
-00305 * @remark This does not actually free the memory, it just allows the pool
-00306 * to re-use this memory for the next allocation.
-00307 * @see apr_pool_destroy()
+00193 * @deprecated @see apr_pool_create_unmanaged_ex.
+00194 */
+00195 APR_DECLARE(apr_status_t) apr_pool_create_core_ex(apr_pool_t **newpool,
+00196 apr_abortfunc_t abort_fn,
+00197 apr_allocator_t *allocator);
+00198
+00199 /**
+00200 * Create a new unmanaged pool.
+00201 * @param newpool The pool we have just created.
+00202 * @param abort_fn A function to use if the pool cannot allocate more memory.
+00203 * @param allocator The allocator to use with the new pool. If NULL a
+00204 * new allocator will be crated with newpool as owner.
+00205 * @remark An unmanaged pool is a special pool without a parent; it will
+00206 * NOT be destroyed upon apr_terminate. It must be explicitly
+00207 * destroyed by calling apr_pool_destroy, to prevent memory leaks.
+00208 * Use of this function is discouraged, think twice about whether
+00209 * you really really need it.
+00210 */
+00211 APR_DECLARE(apr_status_t) apr_pool_create_unmanaged_ex(apr_pool_t **newpool,
+00212 apr_abortfunc_t abort_fn,
+00213 apr_allocator_t *allocator);
+00214
+00215 /**
+00216 * Debug version of apr_pool_create_ex.
+00217 * @param newpool @see apr_pool_create.
+00218 * @param parent @see apr_pool_create.
+00219 * @param abort_fn @see apr_pool_create.
+00220 * @param allocator @see apr_pool_create.
+00221 * @param file_line Where the function is called from.
+00222 * This is usually APR_POOL__FILE_LINE__.
+00223 * @remark Only available when APR_POOL_DEBUG is defined.
+00224 * Call this directly if you have you apr_pool_create_ex
+00225 * calls in a wrapper function and wish to override
+00226 * the file_line argument to reflect the caller of
+00227 * your wrapper function. If you do not have
+00228 * apr_pool_create_ex in a wrapper, trust the macro
+00229 * and don't call apr_pool_create_ex_debug directly.
+00230 */
+00231 APR_DECLARE(apr_status_t) apr_pool_create_ex_debug(apr_pool_t **newpool,
+00232 apr_pool_t *parent,
+00233 apr_abortfunc_t abort_fn,
+00234 apr_allocator_t *allocator,
+00235 const char *file_line);
+00236
+00237 #if APR_POOL_DEBUG
+00238 #define apr_pool_create_ex(newpool, parent, abort_fn, allocator) \
+00239 apr_pool_create_ex_debug(newpool, parent, abort_fn, allocator, \
+00240 APR_POOL__FILE_LINE__)
+00241 #endif
+00242
+00243 /**
+00244 * Debug version of apr_pool_create_core_ex.
+00245 * @deprecated @see apr_pool_create_unmanaged_ex_debug.
+00246 */
+00247 APR_DECLARE(apr_status_t) apr_pool_create_core_ex_debug(apr_pool_t **newpool,
+00248 apr_abortfunc_t abort_fn,
+00249 apr_allocator_t *allocator,
+00250 const char *file_line);
+00251
+00252 /**
+00253 * Debug version of apr_pool_create_unmanaged_ex.
+00254 * @param newpool @see apr_pool_create_unmanaged.
+00255 * @param abort_fn @see apr_pool_create_unmanaged.
+00256 * @param allocator @see apr_pool_create_unmanaged.
+00257 * @param file_line Where the function is called from.
+00258 * This is usually APR_POOL__FILE_LINE__.
+00259 * @remark Only available when APR_POOL_DEBUG is defined.
+00260 * Call this directly if you have you apr_pool_create_unmanaged_ex
+00261 * calls in a wrapper function and wish to override
+00262 * the file_line argument to reflect the caller of
+00263 * your wrapper function. If you do not have
+00264 * apr_pool_create_core_ex in a wrapper, trust the macro
+00265 * and don't call apr_pool_create_core_ex_debug directly.
+00266 */
+00267 APR_DECLARE(apr_status_t) apr_pool_create_unmanaged_ex_debug(apr_pool_t **newpool,
+00268 apr_abortfunc_t abort_fn,
+00269 apr_allocator_t *allocator,
+00270 const char *file_line);
+00271
+00272 #if APR_POOL_DEBUG
+00273 #define apr_pool_create_core_ex(newpool, abort_fn, allocator) \
+00274 apr_pool_create_unmanaged_ex_debug(newpool, abort_fn, allocator, \
+00275 APR_POOL__FILE_LINE__)
+00276
+00277 #define apr_pool_create_unmanaged_ex(newpool, abort_fn, allocator) \
+00278 apr_pool_create_unmanaged_ex_debug(newpool, abort_fn, allocator, \
+00279 APR_POOL__FILE_LINE__)
+00280
+00281 #endif
+00282
+00283 /**
+00284 * Create a new pool.
+00285 * @param newpool The pool we have just created.
+00286 * @param parent The parent pool. If this is NULL, the new pool is a root
+00287 * pool. If it is non-NULL, the new pool will inherit all
+00288 * of its parent pool's attributes, except the apr_pool_t will
+00289 * be a sub-pool.
+00290 */
+00291 #if defined(DOXYGEN)
+00292 APR_DECLARE(apr_status_t) apr_pool_create(apr_pool_t **newpool,
+00293 apr_pool_t *parent);
+00294 #else
+00295 #if APR_POOL_DEBUG
+00296 #define apr_pool_create(newpool, parent) \
+00297 apr_pool_create_ex_debug(newpool, parent, NULL, NULL, \
+00298 APR_POOL__FILE_LINE__)
+00299 #else
+00300 #define apr_pool_create(newpool, parent) \
+00301 apr_pool_create_ex(newpool, parent, NULL, NULL)
+00302 #endif
+00303 #endif
+00304
+00305 /**
+00306 * Create a new pool.
+00307 * @param newpool The pool we have just created.00308 */
-00309 APR_DECLARE(void) apr_pool_clear(apr_pool_t *p);
-00310
-00311 /**
-00312 * Debug version of apr_pool_clear.
-00313 * @param p See: apr_pool_clear.
-00314 * @param file_line Where the function is called from.
-00315 * This is usually APR_POOL__FILE_LINE__.
-00316 * @remark Only available when APR_POOL_DEBUG is defined.
-00317 * Call this directly if you have you apr_pool_clear
-00318 * calls in a wrapper function and wish to override
-00319 * the file_line argument to reflect the caller of
-00320 * your wrapper function. If you do not have
-00321 * apr_pool_clear in a wrapper, trust the macro
-00322 * and don't call apr_pool_destroy_clear directly.
-00323 */
-00324 APR_DECLARE(void) apr_pool_clear_debug(apr_pool_t *p,
-00325 const char *file_line);
-00326
-00327 #if APR_POOL_DEBUG
-00328 #define apr_pool_clear(p) \
-00329 apr_pool_clear_debug(p, APR_POOL__FILE_LINE__)
-00330 #endif
-00331
-00332 /**
-00333 * Destroy the pool. This takes similar action as apr_pool_clear() and then
-00334 * frees all the memory.
-00335 * @param p The pool to destroy
-00336 * @remark This will actually free the memory
-00337 */
-00338 APR_DECLARE(void) apr_pool_destroy(apr_pool_t *p);
-00339
-00340 /**
-00341 * Debug version of apr_pool_destroy.
-00342 * @param p See: apr_pool_destroy.
-00343 * @param file_line Where the function is called from.
-00344 * This is usually APR_POOL__FILE_LINE__.
-00345 * @remark Only available when APR_POOL_DEBUG is defined.
-00346 * Call this directly if you have you apr_pool_destroy
-00347 * calls in a wrapper function and wish to override
-00348 * the file_line argument to reflect the caller of
-00349 * your wrapper function. If you do not have
-00350 * apr_pool_destroy in a wrapper, trust the macro
-00351 * and don't call apr_pool_destroy_debug directly.
-00352 */
-00353 APR_DECLARE(void) apr_pool_destroy_debug(apr_pool_t *p,
-00354 const char *file_line);
-00355
-00356 #if APR_POOL_DEBUG
-00357 #define apr_pool_destroy(p) \
-00358 apr_pool_destroy_debug(p, APR_POOL__FILE_LINE__)
-00359 #endif
-00360
-00361
-00362 /*
-00363 * Memory allocation
-00364 */
-00365
-00366 /**
-00367 * Allocate a block of memory from a pool
-00368 * @param p The pool to allocate from
-00369 * @param size The amount of memory to allocate
-00370 * @return The allocated memory
-00371 */
-00372 APR_DECLARE(void *) apr_palloc(apr_pool_t *p, apr_size_t size);
-00373
-00374 /**
-00375 * Debug version of apr_palloc
-00376 * @param p See: apr_palloc
-00377 * @param size See: apr_palloc
-00378 * @param file_line Where the function is called from.
-00379 * This is usually APR_POOL__FILE_LINE__.
-00380 * @return See: apr_palloc
-00381 */
-00382 APR_DECLARE(void *) apr_palloc_debug(apr_pool_t *p, apr_size_t size,
-00383 const char *file_line);
-00384
-00385 #if APR_POOL_DEBUG
-00386 #define apr_palloc(p, size) \
-00387 apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
-00388 #endif
-00389
-00390 /**
-00391 * Allocate a block of memory from a pool and set all of the memory to 0
-00392 * @param p The pool to allocate from
-00393 * @param size The amount of memory to allocate
-00394 * @return The allocated memory
-00395 */
-00396 #if defined(DOXYGEN)
-00397 APR_DECLARE(void *) apr_pcalloc(apr_pool_t *p, apr_size_t size);
-00398 #elif !APR_POOL_DEBUG
-00399 #define apr_pcalloc(p, size) memset(apr_palloc(p, size), 0, size)
-00400 #endif
-00401
-00402 /**
-00403 * Debug version of apr_pcalloc
-00404 * @param p See: apr_pcalloc
-00405 * @param size See: apr_pcalloc
-00406 * @param file_line Where the function is called from.
-00407 * This is usually APR_POOL__FILE_LINE__.
-00408 * @return See: apr_pcalloc
-00409 */
-00410 APR_DECLARE(void *) apr_pcalloc_debug(apr_pool_t *p, apr_size_t size,
-00411 const char *file_line);
-00412
-00413 #if APR_POOL_DEBUG
-00414 #define apr_pcalloc(p, size) \
-00415 apr_pcalloc_debug(p, size, APR_POOL__FILE_LINE__)
-00416 #endif
-00417
-00418
-00419 /*
-00420 * Pool Properties
-00421 */
-00422
+00309 #if defined(DOXYGEN)
+00310 APR_DECLARE(apr_status_t) apr_pool_create_core(apr_pool_t **newpool);
+00311 APR_DECLARE(apr_status_t) apr_pool_create_unmanaged(apr_pool_t **newpool);
+00312 #else
+00313 #if APR_POOL_DEBUG
+00314 #define apr_pool_create_core(newpool) \
+00315 apr_pool_create_unmanaged_ex_debug(newpool, NULL, NULL, \
+00316 APR_POOL__FILE_LINE__)
+00317 #define apr_pool_create_unmanaged(newpool) \
+00318 apr_pool_create_unmanaged_ex_debug(newpool, NULL, NULL, \
+00319 APR_POOL__FILE_LINE__)
+00320 #else
+00321 #define apr_pool_create_core(newpool) \
+00322 apr_pool_create_unmanaged_ex(newpool, NULL, NULL)
+00323 #define apr_pool_create_unmanaged(newpool) \
+00324 apr_pool_create_unmanaged_ex(newpool, NULL, NULL)
+00325 #endif
+00326 #endif
+00327
+00328 /**
+00329 * Find the pools allocator
+00330 * @param pool The pool to get the allocator from.
+00331 */
+00332 APR_DECLARE(apr_allocator_t *) apr_pool_allocator_get(apr_pool_t *pool);
+00333
+00334 /**
+00335 * Clear all memory in the pool and run all the cleanups. This also destroys all
+00336 * subpools.
+00337 * @param p The pool to clear
+00338 * @remark This does not actually free the memory, it just allows the pool
+00339 * to re-use this memory for the next allocation.
+00340 * @see apr_pool_destroy()
+00341 */
+00342 APR_DECLARE(void) apr_pool_clear(apr_pool_t *p);
+00343
+00344 /**
+00345 * Debug version of apr_pool_clear.
+00346 * @param p See: apr_pool_clear.
+00347 * @param file_line Where the function is called from.
+00348 * This is usually APR_POOL__FILE_LINE__.
+00349 * @remark Only available when APR_POOL_DEBUG is defined.
+00350 * Call this directly if you have you apr_pool_clear
+00351 * calls in a wrapper function and wish to override
+00352 * the file_line argument to reflect the caller of
+00353 * your wrapper function. If you do not have
+00354 * apr_pool_clear in a wrapper, trust the macro
+00355 * and don't call apr_pool_destroy_clear directly.
+00356 */
+00357 APR_DECLARE(void) apr_pool_clear_debug(apr_pool_t *p,
+00358 const char *file_line);
+00359
+00360 #if APR_POOL_DEBUG
+00361 #define apr_pool_clear(p) \
+00362 apr_pool_clear_debug(p, APR_POOL__FILE_LINE__)
+00363 #endif
+00364
+00365 /**
+00366 * Destroy the pool. This takes similar action as apr_pool_clear() and then
+00367 * frees all the memory.
+00368 * @param p The pool to destroy
+00369 * @remark This will actually free the memory
+00370 */
+00371 APR_DECLARE(void) apr_pool_destroy(apr_pool_t *p);
+00372
+00373 /**
+00374 * Debug version of apr_pool_destroy.
+00375 * @param p See: apr_pool_destroy.
+00376 * @param file_line Where the function is called from.
+00377 * This is usually APR_POOL__FILE_LINE__.
+00378 * @remark Only available when APR_POOL_DEBUG is defined.
+00379 * Call this directly if you have you apr_pool_destroy
+00380 * calls in a wrapper function and wish to override
+00381 * the file_line argument to reflect the caller of
+00382 * your wrapper function. If you do not have
+00383 * apr_pool_destroy in a wrapper, trust the macro
+00384 * and don't call apr_pool_destroy_debug directly.
+00385 */
+00386 APR_DECLARE(void) apr_pool_destroy_debug(apr_pool_t *p,
+00387 const char *file_line);
+00388
+00389 #if APR_POOL_DEBUG
+00390 #define apr_pool_destroy(p) \
+00391 apr_pool_destroy_debug(p, APR_POOL__FILE_LINE__)
+00392 #endif
+00393
+00394
+00395 /*
+00396 * Memory allocation
+00397 */
+00398
+00399 /**
+00400 * Allocate a block of memory from a pool
+00401 * @param p The pool to allocate from
+00402 * @param size The amount of memory to allocate
+00403 * @return The allocated memory
+00404 */
+00405 APR_DECLARE(void *) apr_palloc(apr_pool_t *p, apr_size_t size);
+00406
+00407 /**
+00408 * Debug version of apr_palloc
+00409 * @param p See: apr_palloc
+00410 * @param size See: apr_palloc
+00411 * @param file_line Where the function is called from.
+00412 * This is usually APR_POOL__FILE_LINE__.
+00413 * @return See: apr_palloc
+00414 */
+00415 APR_DECLARE(void *) apr_palloc_debug(apr_pool_t *p, apr_size_t size,
+00416 const char *file_line);
+00417
+00418 #if APR_POOL_DEBUG
+00419 #define apr_palloc(p, size) \
+00420 apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
+00421 #endif
+00422
00423 /**
-00424 * Set the function to be called when an allocation failure occurs.
-00425 * @remark If the program wants APR to exit on a memory allocation error,
-00426 * then this function can be called to set the callback to use (for
-00427 * performing cleanup and then exiting). If this function is not called,
-00428 * then APR will return an error and expect the calling program to
-00429 * deal with the error accordingly.
-00430 */
-00431 APR_DECLARE(void) apr_pool_abort_set(apr_abortfunc_t abortfunc,
-00432 apr_pool_t *pool);
-00433
-00434 /**
-00435 * Get the abort function associated with the specified pool.
-00436 * @param pool The pool for retrieving the abort function.
-00437 * @return The abort function for the given pool.
-00438 */
-00439 APR_DECLARE(apr_abortfunc_t) apr_pool_abort_get(apr_pool_t *pool);
-00440
-00441 /**
-00442 * Get the parent pool of the specified pool.
-00443 * @param pool The pool for retrieving the parent pool.
-00444 * @return The parent of the given pool.
-00445 */
-00446 APR_DECLARE(apr_pool_t *) apr_pool_parent_get(apr_pool_t *pool);
-00447
-00448 /**
-00449 * Determine if pool a is an ancestor of pool b.
-00450 * @param a The pool to search
-00451 * @param b The pool to search for
-00452 * @return True if a is an ancestor of b, NULL is considered an ancestor
-00453 * of all pools.
-00454 * @remark if compiled with APR_POOL_DEBUG, this function will also
-00455 * return true if A is a pool which has been guaranteed by the caller
-00456 * (using apr_pool_join) to have a lifetime at least as long as some
-00457 * ancestor of pool B.
-00458 */
-00459 APR_DECLARE(int) apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b);
-00460
-00461 /**
-00462 * Tag a pool (give it a name)
-00463 * @param pool The pool to tag
-00464 * @param tag The tag
-00465 */
-00466 APR_DECLARE(void) apr_pool_tag(apr_pool_t *pool, const char *tag);
-00467
-00468
-00469 /*
-00470 * User data management
+00424 * Allocate a block of memory from a pool and set all of the memory to 0
+00425 * @param p The pool to allocate from
+00426 * @param size The amount of memory to allocate
+00427 * @return The allocated memory
+00428 */
+00429 #if defined(DOXYGEN)
+00430 APR_DECLARE(void *) apr_pcalloc(apr_pool_t *p, apr_size_t size);
+00431 #elif !APR_POOL_DEBUG
+00432 #define apr_pcalloc(p, size) memset(apr_palloc(p, size), 0, size)
+00433 #endif
+00434
+00435 /**
+00436 * Debug version of apr_pcalloc
+00437 * @param p See: apr_pcalloc
+00438 * @param size See: apr_pcalloc
+00439 * @param file_line Where the function is called from.
+00440 * This is usually APR_POOL__FILE_LINE__.
+00441 * @return See: apr_pcalloc
+00442 */
+00443 APR_DECLARE(void *) apr_pcalloc_debug(apr_pool_t *p, apr_size_t size,
+00444 const char *file_line);
+00445
+00446 #if APR_POOL_DEBUG
+00447 #define apr_pcalloc(p, size) \
+00448 apr_pcalloc_debug(p, size, APR_POOL__FILE_LINE__)
+00449 #endif
+00450
+00451
+00452 /*
+00453 * Pool Properties
+00454 */
+00455
+00456 /**
+00457 * Set the function to be called when an allocation failure occurs.
+00458 * @remark If the program wants APR to exit on a memory allocation error,
+00459 * then this function can be called to set the callback to use (for
+00460 * performing cleanup and then exiting). If this function is not called,
+00461 * then APR will return an error and expect the calling program to
+00462 * deal with the error accordingly.
+00463 */
+00464 APR_DECLARE(void) apr_pool_abort_set(apr_abortfunc_t abortfunc,
+00465 apr_pool_t *pool);
+00466
+00467 /**
+00468 * Get the abort function associated with the specified pool.
+00469 * @param pool The pool for retrieving the abort function.
+00470 * @return The abort function for the given pool.00471 */
-00472
-00473 /**
-00474 * Set the data associated with the current pool
-00475 * @param data The user data associated with the pool.
-00476 * @param key The key to use for association
-00477 * @param cleanup The cleanup program to use to cleanup the data (NULL if none)
-00478 * @param pool The current pool
-00479 * @warning The data to be attached to the pool should have a life span
-00480 * at least as long as the pool it is being attached to.
-00481 *
-00482 * Users of APR must take EXTREME care when choosing a key to
-00483 * use for their data. It is possible to accidentally overwrite
-00484 * data by choosing a key that another part of the program is using.
-00485 * Therefore it is advised that steps are taken to ensure that unique
-00486 * keys are used for all of the userdata objects in a particular pool
-00487 * (the same key in two different pools or a pool and one of its
-00488 * subpools is okay) at all times. Careful namespace prefixing of
-00489 * key names is a typical way to help ensure this uniqueness.
-00490 *
+00472 APR_DECLARE(apr_abortfunc_t) apr_pool_abort_get(apr_pool_t *pool);
+00473
+00474 /**
+00475 * Get the parent pool of the specified pool.
+00476 * @param pool The pool for retrieving the parent pool.
+00477 * @return The parent of the given pool.
+00478 */
+00479 APR_DECLARE(apr_pool_t *) apr_pool_parent_get(apr_pool_t *pool);
+00480
+00481 /**
+00482 * Determine if pool a is an ancestor of pool b.
+00483 * @param a The pool to search
+00484 * @param b The pool to search for
+00485 * @return True if a is an ancestor of b, NULL is considered an ancestor
+00486 * of all pools.
+00487 * @remark if compiled with APR_POOL_DEBUG, this function will also
+00488 * return true if A is a pool which has been guaranteed by the caller
+00489 * (using apr_pool_join) to have a lifetime at least as long as some
+00490 * ancestor of pool B.00491 */
-00492 APR_DECLARE(apr_status_t) apr_pool_userdata_set(
-00493 const void *data,
-00494 const char *key,
-00495 apr_status_t (*cleanup)(void *),
-00496 apr_pool_t *pool);
-00497
-00498 /**
-00499 * Set the data associated with the current pool
-00500 * @param data The user data associated with the pool.
-00501 * @param key The key to use for association
-00502 * @param cleanup The cleanup program to use to cleanup the data (NULL if none)
-00503 * @param pool The current pool
-00504 * @note same as apr_pool_userdata_set(), except that this version doesn't
-00505 * make a copy of the key (this function is useful, for example, when
-00506 * the key is a string literal)
-00507 * @warning This should NOT be used if the key could change addresses by
-00508 * any means between the apr_pool_userdata_setn() call and a
-00509 * subsequent apr_pool_userdata_get() on that key, such as if a
-00510 * static string is used as a userdata key in a DSO and the DSO could
-00511 * be unloaded and reloaded between the _setn() and the _get(). You
-00512 * MUST use apr_pool_userdata_set() in such cases.
-00513 * @warning More generally, the key and the data to be attached to the
-00514 * pool should have a life span at least as long as the pool itself.
-00515 *
-00516 */
-00517 APR_DECLARE(apr_status_t) apr_pool_userdata_setn(
-00518 const void *data,
-00519 const char *key,
-00520 apr_status_t (*cleanup)(void *),
-00521 apr_pool_t *pool);
-00522
-00523 /**
-00524 * Return the data associated with the current pool.
-00525 * @param data The user data associated with the pool.
-00526 * @param key The key for the data to retrieve
-00527 * @param pool The current pool.
-00528 */
-00529 APR_DECLARE(apr_status_t) apr_pool_userdata_get(void **data, const char *key,
-00530 apr_pool_t *pool);
-00531
-00532
-00533 /**
-00534 * @defgroup PoolCleanup Pool Cleanup Functions
-00535 *
-00536 * Cleanups are performed in the reverse order they were registered. That is:
-00537 * Last In, First Out. A cleanup function can safely allocate memory from
-00538 * the pool that is being cleaned up. It can also safely register additional
-00539 * cleanups which will be run LIFO, directly after the current cleanup
-00540 * terminates. Cleanups have to take caution in calling functions that
-00541 * create subpools. Subpools, created during cleanup will NOT automatically
-00542 * be cleaned up. In other words, cleanups are to clean up after themselves.
-00543 *
-00544 * @{
-00545 */
-00546
-00547 /**
-00548 * Register a function to be called when a pool is cleared or destroyed
-00549 * @param p The pool register the cleanup with
-00550 * @param data The data to pass to the cleanup function.
-00551 * @param plain_cleanup The function to call when the pool is cleared
-00552 * or destroyed
-00553 * @param child_cleanup The function to call when a child process is about
-00554 * to exec - this function is called in the child, obviously!
-00555 */
-00556 APR_DECLARE(void) apr_pool_cleanup_register(
-00557 apr_pool_t *p,
-00558 const void *data,
-00559 apr_status_t (*plain_cleanup)(void *),
-00560 apr_status_t (*child_cleanup)(void *));
-00561
-00562 /**
-00563 * Register a function to be called when a pool is cleared or destroyed.
-00564 *
-00565 * Unlike apr_pool_cleanup_register which register a cleanup
-00566 * that is called AFTER all subpools are destroyed this function register
-00567 * a function that will be called before any of the subpool is destoryed.
+00492 APR_DECLARE(int) apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b);
+00493
+00494 /**
+00495 * Tag a pool (give it a name)
+00496 * @param pool The pool to tag
+00497 * @param tag The tag
+00498 */
+00499 APR_DECLARE(void) apr_pool_tag(apr_pool_t *pool, const char *tag);
+00500
+00501
+00502 /*
+00503 * User data management
+00504 */
+00505
+00506 /**
+00507 * Set the data associated with the current pool
+00508 * @param data The user data associated with the pool.
+00509 * @param key The key to use for association
+00510 * @param cleanup The cleanup program to use to cleanup the data (NULL if none)
+00511 * @param pool The current pool
+00512 * @warning The data to be attached to the pool should have a life span
+00513 * at least as long as the pool it is being attached to.
+00514 *
+00515 * Users of APR must take EXTREME care when choosing a key to
+00516 * use for their data. It is possible to accidentally overwrite
+00517 * data by choosing a key that another part of the program is using.
+00518 * Therefore it is advised that steps are taken to ensure that unique
+00519 * keys are used for all of the userdata objects in a particular pool
+00520 * (the same key in two different pools or a pool and one of its
+00521 * subpools is okay) at all times. Careful namespace prefixing of
+00522 * key names is a typical way to help ensure this uniqueness.
+00523 *
+00524 */
+00525 APR_DECLARE(apr_status_t) apr_pool_userdata_set(
+00526 const void *data,
+00527 const char *key,
+00528 apr_status_t (*cleanup)(void *),
+00529 apr_pool_t *pool);
+00530
+00531 /**
+00532 * Set the data associated with the current pool
+00533 * @param data The user data associated with the pool.
+00534 * @param key The key to use for association
+00535 * @param cleanup The cleanup program to use to cleanup the data (NULL if none)
+00536 * @param pool The current pool
+00537 * @note same as apr_pool_userdata_set(), except that this version doesn't
+00538 * make a copy of the key (this function is useful, for example, when
+00539 * the key is a string literal)
+00540 * @warning This should NOT be used if the key could change addresses by
+00541 * any means between the apr_pool_userdata_setn() call and a
+00542 * subsequent apr_pool_userdata_get() on that key, such as if a
+00543 * static string is used as a userdata key in a DSO and the DSO could
+00544 * be unloaded and reloaded between the _setn() and the _get(). You
+00545 * MUST use apr_pool_userdata_set() in such cases.
+00546 * @warning More generally, the key and the data to be attached to the
+00547 * pool should have a life span at least as long as the pool itself.
+00548 *
+00549 */
+00550 APR_DECLARE(apr_status_t) apr_pool_userdata_setn(
+00551 const void *data,
+00552 const char *key,
+00553 apr_status_t (*cleanup)(void *),
+00554 apr_pool_t *pool);
+00555
+00556 /**
+00557 * Return the data associated with the current pool.
+00558 * @param data The user data associated with the pool.
+00559 * @param key The key for the data to retrieve
+00560 * @param pool The current pool.
+00561 */
+00562 APR_DECLARE(apr_status_t) apr_pool_userdata_get(void **data, const char *key,
+00563 apr_pool_t *pool);
+00564
+00565
+00566 /**
[... 386 lines stripped ...]