rbb 01/06/13 09:10:20
Modified: . CHANGES
include apr_pools.h
lib apr_pools.c
Log:
Make apr_pool_is_ancestor a non-debug function. This is required for
some logic that HTTPD wants to implement. I have left the join logic
in that function as debug only.
Revision Changes Path
1.113 +4 -0 apr/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apr/CHANGES,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -d -b -w -u -r1.112 -r1.113
--- CHANGES 2001/06/13 14:41:23 1.112
+++ CHANGES 2001/06/13 16:10:15 1.113
@@ -1,5 +1,9 @@
Changes with APR b1
+ *) Make the apr_pool_is_ancestor logic public. This is required for
+ some new logic that is going into HTTPD. I have left the join logic
+ in that function debug only. [Ryan Bloom]
+
*) Clean up Win32 locks when the pool goes away.
[Justin Erenkrantz, Jeff Trawick]
1.50 +9 -8 apr/include/apr_pools.h
Index: apr_pools.h
===================================================================
RCS file: /home/cvs/apr/include/apr_pools.h,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -b -w -u -r1.49 -r1.50
--- apr_pools.h 2001/06/03 11:31:47 1.49
+++ apr_pools.h 2001/06/13 16:10:16 1.50
@@ -156,6 +156,15 @@
*/
APR_DECLARE(apr_pool_t *) apr_find_pool(const void *ts);
+/* @} */
+
+#else
+# ifdef apr_pool_join
+# undef apr_pool_join
+# endif
+# define apr_pool_join(a,b)
+#endif
+
/**
* Determine if pool a is an ancestor of pool b
* @param a The pool to search
@@ -165,14 +174,6 @@
*/
APR_DECLARE(int) apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b);
-/* @} */
-
-#else
-# ifdef apr_pool_join
-# undef apr_pool_join
-# endif
-# define apr_pool_join(a,b)
-#endif
/*
* APR memory structure manipulators (pools, tables, and arrays).
1.98 +22 -20 apr/lib/apr_pools.c
Index: apr_pools.c
===================================================================
RCS file: /home/cvs/apr/lib/apr_pools.c,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -d -b -w -u -r1.97 -r1.98
--- apr_pools.c 2001/05/16 05:30:52 1.97
+++ apr_pools.c 2001/06/13 16:10:18 1.98
@@ -1018,26 +1018,6 @@
return NULL;
}
-/* return TRUE iff a is an ancestor of b
- * NULL is considered an ancestor of all pools
- */
-APR_DECLARE(int) apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b)
-{
- if (a == NULL) {
- return 1;
- }
- while (a->joined) {
- a = a->joined;
- }
- while (b) {
- if (a == b) {
- return 1;
- }
- b = b->parent;
- }
- return 0;
-}
-
/*
* All blocks belonging to sub will be changed to point to p
* instead. This is a guarantee by the caller that sub will not
@@ -1063,6 +1043,28 @@
}
}
#endif
+
+/* return TRUE iff a is an ancestor of b
+ * NULL is considered an ancestor of all pools
+ */
+APR_DECLARE(int) apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b)
+{
+ if (a == NULL) {
+ return 1;
+ }
+#ifdef APR_POOL_DEBUG
+ while (a->joined) {
+ a = a->joined;
+ }
+#endif
+ while (b) {
+ if (a == b) {
+ return 1;
+ }
+ b = b->parent;
+ }
+ return 0;
+}
/*****************************************************************
*