Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I've got it to work with:
unsigned long find_index (key, data) unsigned long key SV * data INIT: STRLEN datalen; char * s; if ((!SvROK(data)) || (SvTYPE(SvRV(data)) != SVt_PV)) { XSRETURN_UNDEF; } s = SvPV(SvRV(data), datalen); CODE: RETVAL = find_index (key, s, datalen); OUTPUT: RETVAL I'm still not sure if SvPV copies its internal data somewhere or just returns a pointer to it. Comments please dino In reply to Re: Re: Re: Passing a very large string by reference to a c library
by dino
|
|