apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: apr-util/include apr_hooks.h
Date Wed, 24 Jan 2001 23:13:18 GMT
Man... it would just be nice to get rid of the damned globals.
apr_global_hook_pool and apr_current_hooking_module.

It would mean a couple extra parameters to the ap_hook_whatever() functions,
but the control/data flow would be a bit more obvious that way.

Cheers,
-g

On Wed, Jan 24, 2001 at 10:52:57PM -0000, ben@apache.org wrote:
> ben         01/01/24 14:52:57
> 
>   Modified:    server   config.c
>                hooks    apr_hooks.c
>                include  apr_hooks.h
>   Log:
>   The current hooking module is _not_ a debugging aid.
>   
>   Revision  Changes    Path
>   1.106     +1 -1      httpd-2.0/server/config.c
>   
>   Index: config.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/server/config.c,v
>   retrieving revision 1.105
>   retrieving revision 1.106
>   diff -u -r1.105 -r1.106
>   --- config.c	2001/01/23 04:14:24	1.105
>   +++ config.c	2001/01/24 22:52:52	1.106
>   @@ -347,7 +347,7 @@
>    	    printf("Registering hooks for %s\n",m->name);
>    	    apr_debug_module_hooks=1;
>    	}
>   -	apr_debug_module_name=m->name;
>   +	apr_current_hooking_module=m->name;
>    	m->register_hooks(p);
>        }
>    }
>   
>   
>   
>   1.31      +2 -2      apr-util/hooks/apr_hooks.c
>   
>   Index: apr_hooks.c
>   ===================================================================
>   RCS file: /home/cvs/apr-util/hooks/apr_hooks.c,v
>   retrieving revision 1.30
>   retrieving revision 1.31
>   diff -u -r1.30 -r1.31
>   --- apr_hooks.c	2001/01/24 22:05:32	1.30
>   +++ apr_hooks.c	2001/01/24 22:52:54	1.31
>   @@ -73,7 +73,7 @@
>    
>    APU_DECLARE_DATA apr_pool_t *apr_global_hook_pool = NULL;
>    APU_DECLARE_DATA int apr_debug_module_hooks = 0;
>   -APU_DECLARE_DATA const char *apr_debug_module_name = NULL;
>   +APU_DECLARE_DATA const char *apr_current_hooking_module = NULL;
>    
>    /* NB: This must echo the LINK_##name structure */
>    typedef struct
>   @@ -322,7 +322,7 @@
>        pHook->aszPredecessors=aszPre;
>        pHook->aszSuccessors=aszSucc;
>        pHook->nOrder=nOrder;
>   -    pHook->szName=apr_debug_module_name;
>   +    pHook->szName=apr_current_hooking_module;
>        if(apr_debug_module_hooks)
>    	apr_show_hook(szName,aszPre,aszSucc);
>    }
>   
>   
>   
>   1.35      +3 -3      apr-util/include/apr_hooks.h
>   
>   Index: apr_hooks.h
>   ===================================================================
>   RCS file: /home/cvs/apr-util/include/apr_hooks.h,v
>   retrieving revision 1.34
>   retrieving revision 1.35
>   diff -u -r1.34 -r1.35
>   --- apr_hooks.h	2001/01/19 07:01:26	1.34
>   +++ apr_hooks.h	2001/01/24 22:52:56	1.35
>   @@ -103,7 +103,7 @@
>        pHook->aszPredecessors=aszPre; \
>        pHook->aszSuccessors=aszSucc; \
>        pHook->nOrder=nOrder; \
>   -    pHook->szName=apr_debug_module_name; \
>   +    pHook->szName=apr_current_hooking_module; \
>        if(apr_debug_module_hooks) \
>    	apr_show_hook(#name,aszPre,aszSucc); \
>        }
>   @@ -232,9 +232,9 @@
>    
>    /**
>     * The name of the module that is currently registering a function
>   - * @defvar apr_pool_t *apr_debug_module_name
>   + * @defvar apr_pool_t *apr_current_hooking_module
>     */ 
>   -extern APU_DECLARE_DATA const char *apr_debug_module_name;
>   +extern APU_DECLARE_DATA const char *apr_current_hooking_module;
>    
>    /**
>     * Register a hook function to be sorted
>   
>   
>   

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message