Doug MacEachern wrote:

> On Mon, 26 Nov 2001, Stas Bekman wrote:
> 
> 
>>I've learned that WRAP/XS cannot handle 'char **' prototypes. It just 
>>steps over the function.
>>
> 
> we shouldn't be using char ** prototypes for anything.


yes, yes, I've moved on since then, it was my initial thought.


>>I still wasn't able to user the same workaround used for 
>>modperl_bucket_read. Any solutions for that?
>>
> 
> the mpxs_modperl_bucket_read takes an SV* for that argument, then calls
> modperl_bucket_read with &str.


yup, I've looked at it already.


>>I'm trying to generate XS for the function of this type:
>>
>>int mpxs_Apache__Foo_test(const char **argv);
>>
> 
> that should be (AV *av) which uses the T_AVREF typemap.
> then have a modperl_util.c function to convert from AV to char **.


do we have such a function? I couldn't find it. I've started to grab 
strings in loop over av_len:

av_argv = (AV*)SvRV(ST(1));
(const char *)SvPV_nolen(AvARRAY(av_argv)[i]))

but I have a gut feeling that it's not very effective way to go.


>>if I pass 'AV', what's the easy way to convert it to 'char **', the 
>>default typemap is supposed to do that as T_PACKEDARRAY XS type. Should 
>>I call:
>>
>>T_PACKEDARRAY
>>         $var = XS_unpack_$ntype($arg)
>>
> 
> but notice the function XS_unpack_charPtrPtr doesn't actually exist.


it doesn't. So where is the magic thing?


> and we should be using \@array not @array anyhow.


yes, I do use \@array.


_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to