apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: [PATCH] Add --enable-pool-debug to configure
Date Tue, 15 Jan 2002 15:03:06 GMT
Sander Striker wrote:
> Ok, that sounds like a plan.
> One minor nit which would be great if we could agree on:
> simply defining APR_POOL_DEBUG should enable the basic debug
> mode.


Most likely it would be best to do the mojo in apr_pools.h and adjust
apr_pools.c accordingly. For example:

   #ifdef APR_POOL_DEBUG
    #if APR_POOL_DEBUG == 2
     #define APR_POOL_DEBUG_LEVEL 2
    #elif APR_POOL_DEBUG == 1
     #define APR_POOL_DEBUG_LEVEL 1
     #define APR_POOL_DEBUG_LEVEL 0

and use APR_POOL_DEBUG_LEVEL in apr_pools.c otherwise you run into lots
of ugly stuff in apr_pool.c. Recall that compiling with -DAPR_POOLS_DEBUG
will not result in


being true. And you can't do stuff like

	#if APR_POOLS_DEBUG == 0 || defined(APR_POOLS_DEBUG)

since that would grab the non 0 ones as well.
   Jim Jagielski   [|]   jim@jaguNET.com   [|]   http://www.jaguNET.com/
      "A society that will trade a little liberty for a little order
                   will lose both and deserve neither"

View raw message