mirror of
https://github.com/apache/httpd.git
synced 2025-07-30 20:03:10 +03:00
The name of HOOK_ORDER is changed to APR_HOOK_ORDER.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100580 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -170,7 +170,7 @@
|
|||||||
static void my_register_hooks()<br />
|
static void my_register_hooks()<br />
|
||||||
{<br />
|
{<br />
|
||||||
<span class="indent">
|
<span class="indent">
|
||||||
ap_hook_do_something(my_something_doer, NULL, NULL, HOOK_MIDDLE);<br />
|
ap_hook_do_something(my_something_doer, NULL, NULL, APR_HOOK_MIDDLE);<br />
|
||||||
</span>
|
</span>
|
||||||
}<br />
|
}<br />
|
||||||
<br />
|
<br />
|
||||||
@ -190,19 +190,19 @@
|
|||||||
There are two mechanisms for doing this. The first, rather
|
There are two mechanisms for doing this. The first, rather
|
||||||
crude, method, allows us to specify roughly where the hook is
|
crude, method, allows us to specify roughly where the hook is
|
||||||
run relative to other modules. The final argument control this.
|
run relative to other modules. The final argument control this.
|
||||||
There are three possible values: <code>HOOK_FIRST</code>,
|
There are three possible values: <code>APR_HOOK_FIRST</code>,
|
||||||
<code>HOOK_MIDDLE</code> and <code>HOOK_LAST</code>.</p>
|
<code>APR_HOOK_MIDDLE</code> and <code>APR_HOOK_LAST</code>.</p>
|
||||||
|
|
||||||
<p>All modules using any particular value may be run in any
|
<p>All modules using any particular value may be run in any
|
||||||
order relative to each other, but, of course, all modules using
|
order relative to each other, but, of course, all modules using
|
||||||
<code>HOOK_FIRST</code> will be run before <code>HOOK_MIDDLE</code>
|
<code>APR_HOOK_FIRST</code> will be run before <code>APR_HOOK_MIDDLE</code>
|
||||||
which are before <code>HOOK_LAST</code>. Modules that don't care
|
which are before <code>APR_HOOK_LAST</code>. Modules that don't care
|
||||||
when they are run should use <code>HOOK_MIDDLE</code>. <em>(I spaced
|
when they are run should use <code>APR_HOOK_MIDDLE</code>. <em>(I spaced
|
||||||
these out so people could do stuff like <code>HOOK_FIRST-2</code>
|
these out so people could do stuff like <code>APR_HOOK_FIRST-2</code>
|
||||||
to get in slightly earlier, but is this wise? - Ben)</em></p>
|
to get in slightly earlier, but is this wise? - Ben)</em></p>
|
||||||
|
|
||||||
<p>Note that there are two more values,
|
<p>Note that there are two more values,
|
||||||
<code>HOOK_REALLY_FIRST</code> and <code>HOOK_REALLY_LAST</code>. These
|
<code>APR_HOOK_REALLY_FIRST</code> and <code>APR_HOOK_REALLY_LAST</code>. These
|
||||||
should only be used by the hook exporter.</p>
|
should only be used by the hook exporter.</p>
|
||||||
|
|
||||||
<p>The other method allows finer control. When a module knows
|
<p>The other method allows finer control. When a module knows
|
||||||
@ -219,13 +219,13 @@
|
|||||||
<span class="indent">
|
<span class="indent">
|
||||||
static const char * const aszPre[] = { "mod_xyz.c", "mod_abc.c", NULL };<br />
|
static const char * const aszPre[] = { "mod_xyz.c", "mod_abc.c", NULL };<br />
|
||||||
<br />
|
<br />
|
||||||
ap_hook_do_something(my_something_doer, aszPre, NULL, HOOK_MIDDLE);<br />
|
ap_hook_do_something(my_something_doer, aszPre, NULL, APR_HOOK_MIDDLE);<br />
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
</code></p></div>
|
</code></p></div>
|
||||||
|
|
||||||
<p>Note that the sort used to achieve this is stable, so
|
<p>Note that the sort used to achieve this is stable, so
|
||||||
ordering set by <code>HOOK_<var>ORDER</var></code> is preserved, as far
|
ordering set by <code>APR_HOOK_<var>ORDER</var></code> is preserved, as far
|
||||||
as is possible.</p>
|
as is possible.</p>
|
||||||
|
|
||||||
<p class="cite"><cite>Ben Laurie</cite>, 15th August 1999</p>
|
<p class="cite"><cite>Ben Laurie</cite>, 15th August 1999</p>
|
||||||
|
@ -153,7 +153,7 @@
|
|||||||
static void my_register_hooks()<br />
|
static void my_register_hooks()<br />
|
||||||
{<br />
|
{<br />
|
||||||
<indent>
|
<indent>
|
||||||
ap_hook_do_something(my_something_doer, NULL, NULL, HOOK_MIDDLE);<br />
|
ap_hook_do_something(my_something_doer, NULL, NULL, APR_HOOK_MIDDLE);<br />
|
||||||
</indent>
|
</indent>
|
||||||
}<br />
|
}<br />
|
||||||
<br />
|
<br />
|
||||||
@ -173,19 +173,19 @@
|
|||||||
There are two mechanisms for doing this. The first, rather
|
There are two mechanisms for doing this. The first, rather
|
||||||
crude, method, allows us to specify roughly where the hook is
|
crude, method, allows us to specify roughly where the hook is
|
||||||
run relative to other modules. The final argument control this.
|
run relative to other modules. The final argument control this.
|
||||||
There are three possible values: <code>HOOK_FIRST</code>,
|
There are three possible values: <code>APR_HOOK_FIRST</code>,
|
||||||
<code>HOOK_MIDDLE</code> and <code>HOOK_LAST</code>.</p>
|
<code>APR_HOOK_MIDDLE</code> and <code>APR_HOOK_LAST</code>.</p>
|
||||||
|
|
||||||
<p>All modules using any particular value may be run in any
|
<p>All modules using any particular value may be run in any
|
||||||
order relative to each other, but, of course, all modules using
|
order relative to each other, but, of course, all modules using
|
||||||
<code>HOOK_FIRST</code> will be run before <code>HOOK_MIDDLE</code>
|
<code>APR_HOOK_FIRST</code> will be run before <code>APR_HOOK_MIDDLE</code>
|
||||||
which are before <code>HOOK_LAST</code>. Modules that don't care
|
which are before <code>APR_HOOK_LAST</code>. Modules that don't care
|
||||||
when they are run should use <code>HOOK_MIDDLE</code>. <em>(I spaced
|
when they are run should use <code>APR_HOOK_MIDDLE</code>. <em>(I spaced
|
||||||
these out so people could do stuff like <code>HOOK_FIRST-2</code>
|
these out so people could do stuff like <code>APR_HOOK_FIRST-2</code>
|
||||||
to get in slightly earlier, but is this wise? - Ben)</em></p>
|
to get in slightly earlier, but is this wise? - Ben)</em></p>
|
||||||
|
|
||||||
<p>Note that there are two more values,
|
<p>Note that there are two more values,
|
||||||
<code>HOOK_REALLY_FIRST</code> and <code>HOOK_REALLY_LAST</code>. These
|
<code>APR_HOOK_REALLY_FIRST</code> and <code>APR_HOOK_REALLY_LAST</code>. These
|
||||||
should only be used by the hook exporter.</p>
|
should only be used by the hook exporter.</p>
|
||||||
|
|
||||||
<p>The other method allows finer control. When a module knows
|
<p>The other method allows finer control. When a module knows
|
||||||
@ -202,13 +202,13 @@
|
|||||||
<indent>
|
<indent>
|
||||||
static const char * const aszPre[] = { "mod_xyz.c", "mod_abc.c", NULL };<br />
|
static const char * const aszPre[] = { "mod_xyz.c", "mod_abc.c", NULL };<br />
|
||||||
<br />
|
<br />
|
||||||
ap_hook_do_something(my_something_doer, aszPre, NULL, HOOK_MIDDLE);<br />
|
ap_hook_do_something(my_something_doer, aszPre, NULL, APR_HOOK_MIDDLE);<br />
|
||||||
</indent>
|
</indent>
|
||||||
}
|
}
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<p>Note that the sort used to achieve this is stable, so
|
<p>Note that the sort used to achieve this is stable, so
|
||||||
ordering set by <code>HOOK_<var>ORDER</var></code> is preserved, as far
|
ordering set by <code>APR_HOOK_<var>ORDER</var></code> is preserved, as far
|
||||||
as is possible.</p>
|
as is possible.</p>
|
||||||
|
|
||||||
<p class="cite"><cite>Ben Laurie</cite>, 15th August 1999</p>
|
<p class="cite"><cite>Ben Laurie</cite>, 15th August 1999</p>
|
||||||
|
Reference in New Issue
Block a user