On Mon, Apr 27, 2020 at 12:09 PM Jeffrey Walton <noloader@xxxxxxxxx> wrote: > > On Mon, Apr 27, 2020 at 12:01 PM Eric Covener <covener@xxxxxxxxx> wrote: > > > > On Mon, Apr 27, 2020 at 11:52 AM Jeffrey Walton <noloader@xxxxxxxxx> wrote: > > > > > > I'm reading https://httpd.apache.org/docs/2.4/developer/hooks.html. It > > > says to declare a hook function: > > > > > > AP_DECLARE_HOOK(int, do_something, (request_rec *r, int n)) > > > > > > But it does not explain the parameters. I know what request_rec is, > > > but I don't know what n is. > > > > > > What is n in the hook function? > > > > It is just an example 2nd argument that each hook participant will > > receive. In the doc it's a made-up hook with a made-up additional arg. > > Many basic request-processing hooks just take a request_rec for example. > > Thanks Eric. > > ap_hook_quick_handler uses a function with that particular signature. > Would you happen to know what the int is used for in that case? > > (ap_hook_quick_handler is the reason for the question. Also see > https://httpd.apache.org/docs/2.4/developer/modguide.html). You can find the doc for the built-in hooks in include/ /** * Run the quick handler functions for each module. The quick_handler * is run before any other requests hooks are called (location_walk, * directory_walk, access checking, et. al.). This hook was added * to provide a quick way to serve content from a URI keyed cache. * * @param r The request_rec * @param lookup_uri Controls whether the caller actually wants content or not. * lookup is set when the quick_handler is called out of * ap_sub_req_lookup_uri() */ AP_DECLARE_HOOK(int,quick_handler,(request_rec *r, int lookup_uri)) -- Eric Covener covener@xxxxxxxxx --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx