On Thu, Jul 31, 2008 at 11:30:27AM +0100, Paulo Filipe Andrade wrote: > I was thinking of something in the line of creating an SV of type pv > right away, and then using sv_2pvbyte_nolen to get the buffer. > I think this should work, but I can't find a newSVpv function that > allows me to specify the string length I want without passing in a > char *. > > Any other suggestions?
Try newSV() You'll need to use SvCUR_set() and SvPOK_on() once you're done to record the length of the data in the PV buffer, and that the PV buffer is valid. Nicholas Clark