wrowe 2002/06/08 13:27:42
Modified: include apr_allocator.h apr_pools.h
memory/unix apr_pools.c
Log:
More API get/set renames, and providing stubs for those previously
renamed without thunks.
Revision Changes Path
1.8 +20 -0 apr/include/apr_allocator.h
Index: apr_allocator.h
===================================================================
RCS file: /home/cvs/apr/include/apr_allocator.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- apr_allocator.h 30 May 2002 00:20:56 -0000 1.7
+++ apr_allocator.h 8 Jun 2002 20:27:42 -0000 1.8
@@ -147,12 +147,19 @@
APR_DECLARE(void) apr_allocator_owner_set(apr_allocator_t *allocator,
apr_pool_t *pool);
+/** @deprecated @see apr_allocator_owner_set */
+APR_DECLARE(void) apr_allocator_set_owner(apr_allocator_t *allocator,
+ apr_pool_t *pool);
+
/**
* Get the current owner of the allocator
* @param allocator The allocator to get the owner from
*/
APR_DECLARE(apr_pool_t *) apr_allocator_owner_get(apr_allocator_t
*allocator);
+/** @deprecated @see apr_allocator_owner_get */
+APR_DECLARE(apr_pool_t *pool) apr_allocator_get_owner(
+ apr_allocator_t *allocator);
/**
* Set the current threshold at which the allocator should start
@@ -160,6 +167,10 @@
* @param allocator The allocator the set the threshold on
* @param size The threshold. 0 == unlimited.
*/
+APR_DECLARE(void) apr_allocator_max_free_set(apr_allocator_t *allocator,
+ apr_size_t size);
+
+/** @deprecated @see apr_allocator_max_free_set */
APR_DECLARE(void) apr_allocator_set_max_free(apr_allocator_t *allocator,
apr_size_t size);
@@ -174,12 +185,21 @@
APR_DECLARE(void) apr_allocator_mutex_set(apr_allocator_t *allocator,
apr_thread_mutex_t *mutex);
+/** @deprecated @see apr_allocator_mutex_set */
+APR_DECLARE(void) apr_allocator_set_mutex(apr_allocator_t *allocator,
+ apr_thread_mutex_t *mutex);
+
/**
* Get the mutex currently set for the allocator
* @param allocator The allocator
*/
APR_DECLARE(apr_thread_mutex_t *) apr_allocator_mutex_get(
apr_allocator_t *allocator);
+
+/** @deprecated @see apr_allocator_mutex_get */
+APR_DECLARE(apr_thread_mutex_t *) apr_allocator_get_mutex(
+ apr_allocator_t *allocator);
+
#endif /* APR_HAS_THREADS */
/** @} */
1.96 +11 -8 apr/include/apr_pools.h
Index: apr_pools.h
===================================================================
RCS file: /home/cvs/apr/include/apr_pools.h,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- apr_pools.h 30 May 2002 01:06:42 -0000 1.95
+++ apr_pools.h 8 Jun 2002 20:27:42 -0000 1.96
@@ -271,14 +271,7 @@
#endif
#endif
-/**
- * This function is deprecated. Use apr_pool_create_ex.
- * @param newpool The new sub-pool
- * @param parent The pool to use as a parent pool
- * @param apr_abort A function to use if the pool cannot allocate more
memory.
- * @remark The @a apr_abort function provides a way to quit the program if
the
- * machine is out of memory. By default, APR will return on error.
- */
+/** @deprecated @see apr_pool_create_ex */
#if APR_POOL_DEBUG
#define apr_pool_sub_make(newpool, parent, abort_fn) \
(void)apr_pool_create_ex_debug(newpool, parent, abort_fn, \
@@ -425,6 +418,10 @@
* then APR will return an error and expect the calling program to
* deal with the error accordingly.
*/
+APR_DECLARE(void) apr_pool_abort_set(apr_abortfunc_t abortfunc,
+ apr_pool_t *pool);
+
+/** @deprecated @see apr_pool_abort_set */
APR_DECLARE(void) apr_pool_set_abort(apr_abortfunc_t abortfunc,
apr_pool_t *pool);
@@ -433,6 +430,9 @@
* @param pool The pool for retrieving the abort function.
* @return The abort function for the given pool.
*/
+APR_DECLARE(apr_abortfunc_t) apr_pool_abort_get(apr_pool_t *pool);
+
+/** @deprecated @see apr_pool_abort_get */
APR_DECLARE(apr_abortfunc_t) apr_pool_get_abort(apr_pool_t *pool);
/**
@@ -440,6 +440,9 @@
* @param pool The pool for retrieving the parent pool.
* @return The parent of the given pool.
*/
+APR_DECLARE(apr_pool_t *) apr_pool_parent_get(apr_pool_t *pool);
+
+/** @deprecated @see apr_pool_parent_get */
APR_DECLARE(apr_pool_t *) apr_pool_get_parent(apr_pool_t *pool);
/**
1.176 +58 -4 apr/memory/unix/apr_pools.c
Index: apr_pools.c
===================================================================
RCS file: /home/cvs/apr/memory/unix/apr_pools.c,v
retrieving revision 1.175
retrieving revision 1.176
diff -u -r1.175 -r1.176
--- apr_pools.c 30 May 2002 01:15:29 -0000 1.175
+++ apr_pools.c 8 Jun 2002 20:27:42 -0000 1.176
@@ -166,7 +166,7 @@
return allocator->owner;
}
-APR_DECLARE(void) apr_allocator_set_max_free(apr_allocator_t *allocator,
+APR_DECLARE(void) apr_allocator_max_free_set(apr_allocator_t *allocator,
apr_size_t size)
{
apr_uint32_t max_free_index;
@@ -1734,18 +1734,18 @@
* Pool Properties
*/
-APR_DECLARE(void) apr_pool_set_abort(apr_abortfunc_t abort_fn,
+APR_DECLARE(void) apr_pool_abort_set(apr_abortfunc_t abort_fn,
apr_pool_t *pool)
{
pool->abort_fn = abort_fn;
}
-APR_DECLARE(apr_abortfunc_t) apr_pool_get_abort(apr_pool_t *pool)
+APR_DECLARE(apr_abortfunc_t) apr_pool_abort_get(apr_pool_t *pool)
{
return pool->abort_fn;
}
-APR_DECLARE(apr_pool_t *) apr_pool_get_parent(apr_pool_t *pool)
+APR_DECLARE(apr_pool_t *) apr_pool_parent_get(apr_pool_t *pool)
{
return pool->parent;
}
@@ -2172,3 +2172,57 @@
}
#endif /* APR_POOL_DEBUG */
+
+/* Deprecated */
+APR_DECLARE(void) apr_allocator_set_max_free(apr_allocator_t *allocator,
+ apr_size_t size)
+{
+ apr_allocator_max_free_set(allocator, size);
+}
+
+/* Deprecated */
+APR_DECLARE(void) apr_pool_set_abort(apr_abortfunc_t abort_fn,
+ apr_pool_t *pool)
+{
+ apr_pool_abort_set(abort_fn, pool);
+}
+
+/* Deprecated */
+APR_DECLARE(apr_abortfunc_t) apr_pool_get_abort(apr_pool_t *pool)
+{
+ return apr_pool_abort_get(pool);
+}
+
+/* Deprecated */
+APR_DECLARE(apr_pool_t *) apr_pool_get_parent(apr_pool_t *pool)
+{
+ return apr_pool_parent_get(pool);
+}
+
+/* Deprecated */
+APR_DECLARE(void) apr_allocator_set_owner(apr_allocator_t *allocator,
+ apr_pool_t *pool)
+{
+ apr_allocator_owner_set(allocator, *pool);
+}
+
+/* Deprecated */
+APR_DECLARE(apr_pool_t *pool) apr_allocator_get_owner(
+ apr_allocator_t *allocator);
+{
+ return apr_allocator_owner_get(allocator);
+}
+
+/* Deprecated */
+APR_DECLARE(apr_thread_mutex_t *) apr_allocator_get_mutex(
+ apr_allocator_t *allocator)
+{
+ return apr_allocator_mutex_get(allocator);
+}
+
+/* Deprecated */
+APR_DECLARE(void) apr_allocator_set_mutex(apr_allocator_t *allocator,
+ apr_thread_mutex_t *mutex)
+{
+ apr_allocator_mutex_set(allocator, mutex);
+}