perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@covalent.net>
Subject Re: un-acceptable function prototypes in Wrap/XS?
Date Wed, 28 Nov 2001 17:02:06 GMT
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.
 
> 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.

> 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 **.
 
> 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'HREFtually exist.
and we should be using \@array not @array anyhow.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message