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:33:12 GMT
On Thu, 29 Nov 2001, Stas Bekman wrote:
 
> 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.

we don't have such a function.  you would need to iterate over the AV to
build it.  then would either need to malloc/free the char ** or create an
apr_array_header_t with given pool and pass (const char **)arr->elts to
the C function.
 
> it doesn't. So where is the magic thing?

nowhere.  the user is supposed to define XS_unpack_$ntype



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


Mime
View raw message