----- Original Message ----- From: "Piers Harding" <[EMAIL PROTECTED]> To: "Sisyphus" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, October 02, 2002 5:07 PM Subject: Re: Return a string to perl
> > I'm confused - if the second argument to newSVpv() is 0 then it > calculates the length for you (so long as it is a NULL terminated string > )? Is this not what you want? > > Cheers. Never sure how to answer a question that's phrased in the negative - but that's definitely what I want. Might have saved myself (and at least one other) some time and effort if I'd looked properly at the perlapi documentation. I looked at the 'newSVpv' documentation yesterday, saw the recommendation that 'newSVpvn' be used instead (for efficiency), started using 'newSVpvn' with some success - and never bothered to look at the 'newSVpv' documentation again - having assumed it would be identical to the documentation for 'newSVpvn'. One difference between these 2 functions is their handling of len = 0. Still - I'm appreciative of the other stuff I've learnt from this foot-in-mouth post. Thanks Piers. Cheers, Rob
