On Tue, 11 Sep 2001, Philippe M . Chiasson wrote:
> As promised, APR::Table->do()
cool!
> A few things worth noting:
>
> * [OT] make source_scan gives me a huge diff and I have to manually weed out
>what's not
> related to my stuff before sending, annoying ... why ?
you don't need to send xs/tables diffs, i can just regenerate them here.
>
> APR::Table->do("my_sub") || APR::Table->do(sub {...});
>
> * Namespace issue. I am not sure about _mpxs_APR__Table_do_callback_data... it's
> clear, but it's long. But I did it because that data shouldn't be used by
>anybody
> but mpxs_APR__Table_do. Better suggestions ?
you can pick something shorter, something like mpxs_table_cb_data_t is
fine.
> * Still doesn't feel like the right way to put it in
>xs/maps/apr_functions.map....but works
see previous comment:
apr_table_do | mpxs_
to setup the call to mpxs_apr_table_do
> * Filtering
> * In 1.3, used to populate a table with the extra arguments passed to do and
>filter
> in the C callback, just before calling the perl callback.
> * apr_table_vdo supports filtering, but it accepts a va_list as argument and
>uses
> va_arg to fetch the elements. Question, is there a way to create something
>that
> apr_table_vdo would swallow as a va_list and on wich va_arg(vp, char *)
>would work?
> If so, please tell me, as it would skip many operations and speed things up
>a bit.
i think this addressed in your second patch (haven't looked yet).
> +#define _mpxs_APR__Table_do_callback_prototype (int (*)(void *, const char *, const
>char *))
this should be a typedef.
> +static MP_INLINE
> +void mpxs_APR__Table_do(apr_table_t *table, SV *sub)
> +{
> + dTHX; /*XXX*/
dTHX; should be avoided whenever possible. if you setup the .map as
discussed:
apr_table_do | mpxs_
mpxs_apr_table_do
will be passed aTHX
there's still minor style issues:
if(...){
vs.
if (...) {
and
("one","two","three")
vs.
("one", "two", "three")
otherwise, looking good!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]