httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: httpd-2.0/modules/experimental mod_optional_hook_export.c mod_optional_hook_export.h mod_optional_hook_import.c
Date Sun, 20 May 2001 14:13:34 GMT
ben         01/05/20 07:13:34

  Modified:    include  ap_config.h
               modules/experimental mod_optional_hook_export.c
                        mod_optional_hook_export.h
                        mod_optional_hook_import.c
  Log:
  AP_ function for optional hooks.
  
  Revision  Changes    Path
  1.61      +22 -0     httpd-2.0/include/ap_config.h
  
  Index: ap_config.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/ap_config.h,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- ap_config.h	2001/04/03 06:01:49	1.60
  +++ ap_config.h	2001/05/20 14:13:31	1.61
  @@ -57,6 +57,7 @@
   
   #include "apr.h"
   #include "apr_hooks.h"
  +#include "apr_optional_hooks.h"
   
   /**
    * @file ap_config.h
  @@ -228,6 +229,27 @@
   #define AP_IMPLEMENT_HOOK_RUN_FIRST(ret,name,args_decl,args_use,decline) \
   	APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(ap,AP,ret,name,args_decl, \
                                                 args_use,decline)
  +
  +/* Note that the other optional hook implementations are straightforward but
  + * have not yet been needed
  + */
  +
  +/**
  + * Implement an optional hook. This is exactly the same as a standard hook
  + * implementation, except the hook is optional.
  + * @see AP_IMPLEMENT_HOOK_RUN_ALL
  + */
  +#define AP_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ret,name,args_decl,args_use,ok, \
  +					   decline) \
  +	APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ap,AP,ret,name,args_decl, \
  +                                            args_use,ok,decline)
  +
  +/**
  + * Hook an optional hook. Unlike static hooks, this uses a macro instead of a
  + * function
  + */
  +#define AP_OPTIONAL_HOOK(name,fn,pre,succ,order) \
  +        APR_OPTIONAL_HOOK(ap,name,fn,pre,succ,order)
   
   #include "os.h"
   #ifndef WIN32
  
  
  
  1.3       +3 -1      httpd-2.0/modules/experimental/mod_optional_hook_export.c
  
  Index: mod_optional_hook_export.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_optional_hook_export.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mod_optional_hook_export.c	2001/05/20 12:56:52	1.2
  +++ mod_optional_hook_export.c	2001/05/20 14:13:32	1.3
  @@ -57,8 +57,10 @@
   #include "mod_optional_hook_export.h"
   #include "http_protocol.h"
   
  -APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ap,AP_MODULE,int,optional_hook_test,
  +/*APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ap,AP_MODULE,int,optional_hook_test,
   				    (const char *szStr),
  +				    (szStr),OK,DECLINED)*/
  +AP_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(int,optional_hook_test,(const char *szStr),
   				    (szStr),OK,DECLINED)
   
   static int ExportLogTransaction(request_rec *r)
  
  
  
  1.3       +1 -1      httpd-2.0/modules/experimental/mod_optional_hook_export.h
  
  Index: mod_optional_hook_export.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_optional_hook_export.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mod_optional_hook_export.h	2001/05/20 12:56:52	1.2
  +++ mod_optional_hook_export.h	2001/05/20 14:13:33	1.3
  @@ -57,6 +57,6 @@
   
   #include "apr_optional_hooks.h"
   
  -APR_DECLARE_EXTERNAL_HOOK(ap,AP_MODULE,int,optional_hook_test,(const char *))
  +AP_DECLARE_HOOK(int,optional_hook_test,(const char *))
   
   #endif /* def MOD_OPTIONAL_HOOK_EXPORT_H */
  
  
  
  1.3       +2 -2      httpd-2.0/modules/experimental/mod_optional_hook_import.c
  
  Index: mod_optional_hook_import.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_optional_hook_import.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mod_optional_hook_import.c	2001/05/20 12:56:52	1.2
  +++ mod_optional_hook_import.c	2001/05/20 14:13:33	1.3
  @@ -67,8 +67,8 @@
   
   static void ImportRegisterHooks(apr_pool_t *p)
   {
  -    APR_OPTIONAL_HOOK(ap,optional_hook_test,ImportGenericHookTestHook,NULL,
  -		      NULL,APR_HOOK_MIDDLE);
  +    AP_OPTIONAL_HOOK(optional_hook_test,ImportGenericHookTestHook,NULL,
  +		     NULL,APR_HOOK_MIDDLE);
   }
   
   module optional_hook_import_module=
  
  
  

Mime
View raw message