From: Yoshiki Hayashi
{
- ap_hook_do_something(my_something_doer, NULL, NULL, HOOK_MIDDLE);
+ ap_hook_do_something(my_something_doer, NULL, NULL, APR_HOOK_MIDDLE);
}
@@ -190,19 +190,19 @@
There are two mechanisms for doing this. The first, rather
crude, method, allows us to specify roughly where the hook is
run relative to other modules. The final argument control this.
- There are three possible values: HOOK_FIRST,
- HOOK_MIDDLE and HOOK_LAST.
APR_HOOK_FIRST,
+ APR_HOOK_MIDDLE and APR_HOOK_LAST.
All modules using any particular value may be run in any
order relative to each other, but, of course, all modules using
- HOOK_FIRST will be run before HOOK_MIDDLE
- which are before HOOK_LAST. Modules that don't care
- when they are run should use HOOK_MIDDLE. (I spaced
- these out so people could do stuff like HOOK_FIRST-2
+ APR_HOOK_FIRST will be run before APR_HOOK_MIDDLE
+ which are before APR_HOOK_LAST. Modules that don't care
+ when they are run should use APR_HOOK_MIDDLE. (I spaced
+ these out so people could do stuff like APR_HOOK_FIRST-2
to get in slightly earlier, but is this wise? - Ben)
Note that there are two more values,
- HOOK_REALLY_FIRST and HOOK_REALLY_LAST. These
+ APR_HOOK_REALLY_FIRST and APR_HOOK_REALLY_LAST. These
should only be used by the hook exporter.
The other method allows finer control. When a module knows
@@ -219,13 +219,13 @@
static const char * const aszPre[] = { "mod_xyz.c", "mod_abc.c", NULL };
- ap_hook_do_something(my_something_doer, aszPre, NULL, HOOK_MIDDLE);
+ ap_hook_do_something(my_something_doer, aszPre, NULL, APR_HOOK_MIDDLE);
}
Note that the sort used to achieve this is stable, so
- ordering set by HOOK_ORDER is preserved, as far
+ ordering set by APR_HOOK_ORDER is preserved, as far
as is possible.
Ben Laurie, 15th August 1999
diff --git a/docs/manual/developer/hooks.xml b/docs/manual/developer/hooks.xml index af7c0248b51..7556c1845a1 100644 --- a/docs/manual/developer/hooks.xml +++ b/docs/manual/developer/hooks.xml @@ -153,7 +153,7 @@ static void my_register_hooks()HOOK_FIRST,
- HOOK_MIDDLE and HOOK_LAST.
+ There are three possible values: APR_HOOK_FIRST,
+ APR_HOOK_MIDDLE and APR_HOOK_LAST.
All modules using any particular value may be run in any
order relative to each other, but, of course, all modules using
- HOOK_FIRST will be run before HOOK_MIDDLE
- which are before HOOK_LAST. Modules that don't care
- when they are run should use HOOK_MIDDLE. (I spaced
- these out so people could do stuff like HOOK_FIRST-2
+ APR_HOOK_FIRST will be run before APR_HOOK_MIDDLE
+ which are before APR_HOOK_LAST. Modules that don't care
+ when they are run should use APR_HOOK_MIDDLE. (I spaced
+ these out so people could do stuff like APR_HOOK_FIRST-2
to get in slightly earlier, but is this wise? - Ben)
Note that there are two more values,
- HOOK_REALLY_FIRST and HOOK_REALLY_LAST. These
+ APR_HOOK_REALLY_FIRST and APR_HOOK_REALLY_LAST. These
should only be used by the hook exporter.
The other method allows finer control. When a module knows
@@ -202,13 +202,13 @@
- ap_hook_do_something(my_something_doer, aszPre, NULL, HOOK_MIDDLE);
+ ap_hook_do_something(my_something_doer, aszPre, NULL, APR_HOOK_MIDDLE);
Note that the sort used to achieve this is stable, so
- ordering set by HOOK_ORDER is preserved, as far
+ ordering set by APR_HOOK_ORDER is preserved, as far
as is possible.
Ben Laurie, 15th August 1999