apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1072938 - /apr/apr-util/branches/1.5.x/include/apr_hooks.h
Date Mon, 21 Feb 2011 12:08:58 GMT
Author: trawick
Date: Mon Feb 21 12:08:58 2011
New Revision: 1072938

URL: http://svn.apache.org/viewvc?rev=1072938&view=rev
Log:
merge r1072937 from apr trunk:

add hook function args to the hook probe invocations

Modified:
    apr/apr-util/branches/1.5.x/include/apr_hooks.h

Modified: apr/apr-util/branches/1.5.x/include/apr_hooks.h
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.5.x/include/apr_hooks.h?rev=1072938&r1=1072937&r2=1072938&view=diff
==============================================================================
--- apr/apr-util/branches/1.5.x/include/apr_hooks.h (original)
+++ apr/apr-util/branches/1.5.x/include/apr_hooks.h Mon Feb 21 12:08:58 2011
@@ -63,8 +63,10 @@ extern "C" {
  * this macro, and will be provided to the other hook probe macros.
  * @param ns The namespace prefix of the hook functions
  * @param name The name of the hook
+ * @param args The argument list to the hook functions, with enclosing
+ * parens.
  */
-#define APR_HOOK_PROBE_ENTRY(ud,ns,name)
+#define APR_HOOK_PROBE_ENTRY(ud,ns,name,args)
 /**
  * User-defined hook probe macro that is invoked after the hook
  * has run.
@@ -73,8 +75,10 @@ extern "C" {
  * @param ns The namespace prefix of the hook functions
  * @param name The name of the hook
  * @param rv The return value of the hook, or 0 if the hook is void.
+ * @param args The argument list to the hook functions, with enclosing
+ * parens.
  */
-#define APR_HOOK_PROBE_RETURN(ud,ns,name,rv)
+#define APR_HOOK_PROBE_RETURN(ud,ns,name,rv,args)
 /**
  * User-defined hook probe macro that is invoked before calling a
  * hook function.
@@ -84,8 +88,10 @@ extern "C" {
  * @param name The name of the hook
  * @param src The value of apr_hook_debug_current at the time the function
  * was hooked (usually the source file implementing the hook function).
+ * @param args The argument list to the hook functions, with enclosing
+ * parens.
  */
-#define APR_HOOK_PROBE_INVOKE(ud,ns,name,src)
+#define APR_HOOK_PROBE_INVOKE(ud,ns,name,src,args)
 /**
  * User-defined hook probe macro that is invoked after calling a
  * hook function.
@@ -96,8 +102,10 @@ extern "C" {
  * @param src The value of apr_hook_debug_current at the time the function
  * was hooked (usually the source file implementing the hook function).
  * @param rv The return value of the hook function, or 0 if the hook is void.
+ * @param args The argument list to the hook functions, with enclosing
+ * parens.
  */
-#define APR_HOOK_PROBE_COMPLETE(ud,ns,name,src,rv)
+#define APR_HOOK_PROBE_COMPLETE(ud,ns,name,src,rv,args)
 #endif
 
 /** @} */
@@ -176,20 +184,20 @@ link##_DECLARE(void) ns##_run_##name arg
     int n; \
     APR_HOOK_INT_DCL_UD; \
 \
-    APR_HOOK_PROBE_ENTRY(ud, ns, name); \
+    APR_HOOK_PROBE_ENTRY(ud, ns, name, args_use); \
 \
     if(_hooks.link_##name) \
         { \
         pHook=(ns##_LINK_##name##_t *)_hooks.link_##name->elts; \
         for(n=0 ; n < _hooks.link_##name->nelts ; ++n) \
             { \
-            APR_HOOK_PROBE_INVOKE(ud, ns, name, (char *)pHook[n].szName); \
+            APR_HOOK_PROBE_INVOKE(ud, ns, name, (char *)pHook[n].szName, args_use); \
 	    pHook[n].pFunc args_use; \
-            APR_HOOK_PROBE_COMPLETE(ud, ns, name, (char *)pHook[n].szName, 0); \
+            APR_HOOK_PROBE_COMPLETE(ud, ns, name, (char *)pHook[n].szName, 0, args_use);
\
             } \
         } \
 \
-    APR_HOOK_PROBE_RETURN(ud, ns, name, 0); \
+    APR_HOOK_PROBE_RETURN(ud, ns, name, 0, args_use); \
 \
     }
 
@@ -220,23 +228,23 @@ link##_DECLARE(ret) ns##_run_##name args
     ret rv = ok; \
     APR_HOOK_INT_DCL_UD; \
 \
-    APR_HOOK_PROBE_ENTRY(ud, ns, name); \
+    APR_HOOK_PROBE_ENTRY(ud, ns, name, args_use); \
 \
     if(_hooks.link_##name) \
         { \
         pHook=(ns##_LINK_##name##_t *)_hooks.link_##name->elts; \
         for(n=0 ; n < _hooks.link_##name->nelts ; ++n) \
             { \
-            APR_HOOK_PROBE_INVOKE(ud, ns, name, (char *)pHook[n].szName); \
+            APR_HOOK_PROBE_INVOKE(ud, ns, name, (char *)pHook[n].szName, args_use); \
             rv=pHook[n].pFunc args_use; \
-            APR_HOOK_PROBE_COMPLETE(ud, ns, name, (char *)pHook[n].szName, rv); \
+            APR_HOOK_PROBE_COMPLETE(ud, ns, name, (char *)pHook[n].szName, rv, args_use);
\
             if(rv != ok && rv != decline) \
                 break; \
             rv = ok; \
             } \
         } \
 \
-    APR_HOOK_PROBE_RETURN(ud, ns, name, rv); \
+    APR_HOOK_PROBE_RETURN(ud, ns, name, rv, args_use); \
 \
     return rv; \
     }
@@ -265,23 +273,23 @@ link##_DECLARE(ret) ns##_run_##name args
     ret rv = decline; \
     APR_HOOK_INT_DCL_UD; \
 \
-    APR_HOOK_PROBE_ENTRY(ud, ns, name); \
+    APR_HOOK_PROBE_ENTRY(ud, ns, name, args_use); \
 \
     if(_hooks.link_##name) \
         { \
         pHook=(ns##_LINK_##name##_t *)_hooks.link_##name->elts; \
         for(n=0 ; n < _hooks.link_##name->nelts ; ++n) \
             { \
-            APR_HOOK_PROBE_INVOKE(ud, ns, name, (char *)pHook[n].szName); \
+            APR_HOOK_PROBE_INVOKE(ud, ns, name, (char *)pHook[n].szName, args_use); \
             rv=pHook[n].pFunc args_use; \
-            APR_HOOK_PROBE_COMPLETE(ud, ns, name, (char *)pHook[n].szName, rv); \
+            APR_HOOK_PROBE_COMPLETE(ud, ns, name, (char *)pHook[n].szName, rv, args_use);
\
 \
             if(rv != decline) \
                 break; \
             } \
         } \
 \
-    APR_HOOK_PROBE_RETURN(ud, ns, name, rv); \
+    APR_HOOK_PROBE_RETURN(ud, ns, name, rv, args_use); \
 \
     return rv; \
     }



Mime
View raw message