You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2005/05/04 14:12:20 UTC
svn commit: r168117 - /apr/apr/trunk/tables/apr_tables.c
Author: jorton
Date: Wed May 4 05:12:19 2005
New Revision: 168117
URL: http://svn.apache.org/viewcvs?rev=168117&view=rev
Log:
* tables/apr_tables.c: Enable pool lifetime debugging checks
throughout.
Modified:
apr/apr/trunk/tables/apr_tables.c
Modified: apr/apr/trunk/tables/apr_tables.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/tables/apr_tables.c?rev=168117&r1=168116&r2=168117&view=diff
==============================================================================
--- apr/apr/trunk/tables/apr_tables.c (original)
+++ apr/apr/trunk/tables/apr_tables.c Wed May 4 05:12:19 2005
@@ -1,4 +1,3 @@
-#include <stdio.h>
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
* applicable.
*
@@ -39,6 +38,10 @@
#include <strings.h>
#endif
+#if APR_POOL_DEBUG && APR_HAVE_STDIO_H
+#include <stdio.h>
+#endif
+
/*****************************************************************
* This file contains array and apr_table_t functions only.
*/
@@ -392,12 +395,12 @@
{
apr_table_t *new = apr_palloc(p, sizeof(apr_table_t));
-#ifdef POOL_DEBUG
+#if APR_POOL_DEBUG
/* we don't copy keys and values, so it's necessary that t->a.pool
* have a life span at least as long as p
*/
if (!apr_pool_is_ancestor(t->a.pool, p)) {
- fprintf(stderr, "copy_table: t's pool is not an ancestor of p\n");
+ fprintf(stderr, "apr_table_copy: t's pool is not an ancestor of p\n");
abort();
}
#endif
@@ -705,14 +708,14 @@
apr_uint32_t checksum;
int hash;
-#ifdef POOL_DEBUG
+#if APR_POOL_DEBUG
{
if (!apr_pool_is_ancestor(apr_pool_find(key), t->a.pool)) {
- fprintf(stderr, "table_set: key not in ancestor pool of t\n");
+ fprintf(stderr, "apr_table_mergen: key not in ancestor pool of t\n");
abort();
}
if (!apr_pool_is_ancestor(apr_pool_find(val), t->a.pool)) {
- fprintf(stderr, "table_set: key not in ancestor pool of t\n");
+ fprintf(stderr, "apr_table_mergen: key not in ancestor pool of t\n");
abort();
}
}
@@ -774,14 +777,14 @@
apr_uint32_t checksum;
int hash;
-#ifdef POOL_DEBUG
+#if APR_POOL_DEBUG
{
if (!apr_pool_is_ancestor(apr_pool_find(key), t->a.pool)) {
- fprintf(stderr, "table_set: key not in ancestor pool of t\n");
+ fprintf(stderr, "apr_table_addn: key not in ancestor pool of t\n");
abort();
}
if (!apr_pool_is_ancestor(apr_pool_find(val), t->a.pool)) {
- fprintf(stderr, "table_set: key not in ancestor pool of t\n");
+ fprintf(stderr, "apr_table_addn: key not in ancestor pool of t\n");
abort();
}
}
@@ -806,19 +809,19 @@
{
apr_table_t *res;
-#ifdef POOL_DEBUG
+#if APR_POOL_DEBUG
/* we don't copy keys and values, so it's necessary that
* overlay->a.pool and base->a.pool have a life span at least
* as long as p
*/
if (!apr_pool_is_ancestor(overlay->a.pool, p)) {
fprintf(stderr,
- "overlay_tables: overlay's pool is not an ancestor of p\n");
+ "apr_table_overlay: overlay's pool is not an ancestor of p\n");
abort();
}
if (!apr_pool_is_ancestor(base->a.pool, p)) {
fprintf(stderr,
- "overlay_tables: base's pool is not an ancestor of p\n");
+ "apr_table_overlay: base's pool is not an ancestor of p\n");
abort();
}
#endif