You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2003/02/17 10:12:25 UTC
Re: cvs commit: modperl-2.0/xs/maps modperl_functions.map
stas@apache.org wrote:
> stas 2003/02/17 01:03:17
>
> Modified: . Changes
> lib/Apache compat.pm
> src/modules/perl modperl_callback.c modperl_callback.h
> modperl_handler.c
> t/htdocs .cvsignore
> t/modperl .cvsignore
> t/response/TestCompat apache.pm
> todo api.txt
> xs/ModPerl/Util ModPerl__Util.h
> xs/maps modperl_functions.map
> Added: t/response/TestModperl current_callback.pm
> Log:
> - implement Apache::current_callback
> - $r->current_callback goes into Apache::compat, since now we have a way
> too many callbacks unrelated to $r
> - add some tests
As you have noticed I've changed the API to be just Apache::current_callback,
rather than $r->callback since we now have many more callbacks which has
nothing to do with $r.
Though if you have a better idea for the the internal implementation, than:
> +#define modperl_callback_current_callback_sv \
> + get_sv("Apache::__CurrentCallback", TRUE)
> +
> +#define modperl_callback_current_callback_set(desc) \
> + sv_setpv(modperl_callback_current_callback_sv, desc)
> +
> +#define modperl_callback_current_callback_get() \
> + SvPVX(modperl_callback_current_callback_sv)
> +
please speak up. (This one was copied from 1.x, but dropped the notes(), which
has allowed to simplify the API.
Finally, I wasn't sure where to put it. So I ended up putting it into
ModPerl::Util. I don't think this is very intuitive as the API goes
Apache::current_callback. But I didn't know where to put it in Apache::
modules... Ideas are welcome.
> Index: ModPerl__Util.h
...
> +#define mpxs_Apache_current_callback modperl_callback_current_callback_get
...
> Index: modperl_functions.map
...
> +PACKAGE=Apache
> + char *:DEFINE_current_callback
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
rfc: Apache::current_callback or ModPerl::Util::current_callback
Posted by Stas Bekman <st...@stason.org>.
So what do you think? Should this be Apache::current_callback or
ModPerl::Util::current_callback? If Apache::current_callback should it be
still live in ModPerl::Util?
I tend to move to ModPerl::Util::current_callback, since current_callback is
not really in Apache API.
Stas Bekman wrote:
> stas@apache.org wrote:
>
>> stas 2003/02/17 01:03:17
>>
>> Modified: . Changes
>> lib/Apache compat.pm
>> src/modules/perl modperl_callback.c modperl_callback.h
>> modperl_handler.c
>> t/htdocs .cvsignore
>> t/modperl .cvsignore
>> t/response/TestCompat apache.pm
>> todo api.txt
>> xs/ModPerl/Util ModPerl__Util.h
>> xs/maps modperl_functions.map
>> Added: t/response/TestModperl current_callback.pm
>> Log:
>> - implement Apache::current_callback
>> - $r->current_callback goes into Apache::compat, since now we have a
>> way
>> too many callbacks unrelated to $r
>> - add some tests
>
>
> As you have noticed I've changed the API to be just
> Apache::current_callback, rather than $r->callback since we now have
> many more callbacks which has nothing to do with $r.
>
> Though if you have a better idea for the the internal implementation, than:
>
>> +#define modperl_callback_current_callback_sv \
>> + get_sv("Apache::__CurrentCallback", TRUE)
>> +
>> +#define modperl_callback_current_callback_set(desc) \
>> + sv_setpv(modperl_callback_current_callback_sv, desc)
>> +
>> +#define modperl_callback_current_callback_get() \
>> + SvPVX(modperl_callback_current_callback_sv)
>> +
>
>
> please speak up. (This one was copied from 1.x, but dropped the notes(),
> which has allowed to simplify the API.
>
> Finally, I wasn't sure where to put it. So I ended up putting it into
> ModPerl::Util. I don't think this is very intuitive as the API goes
> Apache::current_callback. But I didn't know where to put it in Apache::
> modules... Ideas are welcome.
>
>> Index: ModPerl__Util.h
>
> ...
>
>> +#define mpxs_Apache_current_callback
>> modperl_callback_current_callback_get
>
> ...
>
>> Index: modperl_functions.map
>
> ...
>
>> +PACKAGE=Apache
>> + char *:DEFINE_current_callback
>
>
>
> __________________________________________________________________
> Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org http://ticketmaster.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
> For additional commands, e-mail: dev-help@perl.apache.org
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org