You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "William A. Rowe, Jr." <wr...@rowe-clan.net> on 2001/01/19 07:06:25 UTC

Rename update

Here's where we stand (not happily :-(

Our simple idea of renaming apr symbols hit one, big, huge,
nasty snag.  Hooks.

Actually, the hook macro and fn names are fine.  It's the implemented
hook function names that bug the cr*p out of me.  There is one obvious
solution, and probably the right one, to add another first arg to the
DECLARE/IMPLEMENT_EXTERNAL macros (not the ones inside apache that hide
the AP linkage, they can hide this new detail as well.)

The namespace arg, e.g. ap for apache, dav for, well, dav, etc, would
make sure that each application's hooks are actually registered to that
application.  That means that dav's hooks would now use the function

dav_run_something_useful()

Does this idea basically appeal?  If so, the rename should be completed
in 15 minutes or so.

Bill

RE: Rename update

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
> From: Greg Stein [mailto:gstein@lyra.org]
> Sent: Friday, January 19, 2001 12:13 AM
> 
> On Fri, Jan 19, 2001 at 12:06:25AM -0600, William A. Rowe, Jr. wrote:
> > [...] add another first arg to the
> > DECLARE/IMPLEMENT_EXTERNAL macros (not the ones inside apache that hide
> > the AP linkage, they can hide this new detail as well.)

That is, the AP_DECLARE/IMPLEMENT_HOOK_(foo...) invokes the big ugly macro
APR_DECLARE/IMPLEMENT_EXTERNAL_HOOK_(ap,APR,foo...), I think this answers
your concern.

> > The namespace arg, e.g. ap for apache, dav for, well, dav, etc, would
> > make sure that each application's hooks are actually registered to that
> > application. Does this idea basically appeal?  If so, the rename should 
> > be completed in 15 minutes or so.
> 
> As long as we aren't required to pass "ap" to all the hook macros in Apache.
> For the guys that have their own hooks (mod_dav, mod_include), it seems fine
> to me to require their declarations to pass a namespace (if it gets onerous,
> those modules can always define simpler covers that automagically pass the
> namespace).

Ack.  Dav invokes with (dav,DAV,something_useful...) and Apache doesn't need
to, since it has a two line wrapper.

> I'm thinking that you have two changes:
> 
>     dav_run_something_useful()
>     dav_hook_something_useful()

That's the idea.

> One in the registration, and one to run the darn thing.
> 
> Seems fine.

15 minutes then.

Re: Rename update

Posted by Greg Stein <gs...@lyra.org>.
On Fri, Jan 19, 2001 at 12:06:25AM -0600, William A. Rowe, Jr. wrote:
> Here's where we stand (not happily :-(
> 
> Our simple idea of renaming apr symbols hit one, big, huge,
> nasty snag.  Hooks.
> 
> Actually, the hook macro and fn names are fine.  It's the implemented
> hook function names that bug the cr*p out of me.  There is one obvious
> solution, and probably the right one, to add another first arg to the
> DECLARE/IMPLEMENT_EXTERNAL macros (not the ones inside apache that hide
> the AP linkage, they can hide this new detail as well.)
> 
> The namespace arg, e.g. ap for apache, dav for, well, dav, etc, would
> make sure that each application's hooks are actually registered to that
> application.  That means that dav's hooks would now use the function
> 
> dav_run_something_useful()
> 
> Does this idea basically appeal?  If so, the rename should be completed
> in 15 minutes or so.

As long as we aren't required to pass "ap" to all the hook macros in Apache.
For the guys that have their own hooks (mod_dav, mod_include), it seems fine
to me to require their declarations to pass a namespace (if it gets onerous,
those modules can always define simpler covers that automagically pass the
namespace).

I'm thinking that you have two changes:

    dav_run_something_useful()
    dav_hook_something_useful()

One in the registration, and one to run the darn thing.

Seems fine.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/