XS question

Nicholas Clark nick at ccl4.org
Fri Sep 29 16:15:16 BST 2006


On Fri, Sep 29, 2006 at 04:01:26PM +0200, Thomas Busch wrote:
> hi all,
> 
> what length will I get in the following case:
> 
> data = SvPV(my_sv, PL_na);
> size = (int)PL_na;

Don't use PL_na.
Create your own local variable. PL_na kicks out to thread local storage in
a threaded perl, to maintain source compatibility with mistakes in older
Perl versions

> if my_sv is encoded internally in UTF8.
> Will it be the character size or the binary
> size ?

The binary size. Octets.

Nicholas Clark


More information about the london.pm mailing list