Billy Patton <[EMAIL PROTECTED]> writes:
>I've been writing my XS on the sun with version 5.005
>This line is ok on the sun, but fails on my PC runniing
>perl 5.6.1
>    name = (char*) SvPV(*av_fetch(a,i,0),na);
>
>perlguts tell me I can use SvPV_nolen with 5.6
>but perl5 does not recognize this.
>What #ifdef can I use to put into my XS
>#ifdef XXX
>    name = (char*) SvPV(*av_fetch(a,i,0),na);
>#else
>    name = (char*) SvPV_nolen(*av_fetch(a,i,0));
>#endif

Better yet provide a STRLEN variable of your own:

  STRLEN unused;
  name = (char*) SvPV(*av_fetch(a,i,0),unused);

"na" is just a global variable that perl provided for this.
With threads etc. and on some machines a global rather than
a local proved to be a bad idea. It was renamed PL_na to avoid
name-space polution.


--
Nick Ing-Simmons
http://www.ni-s.u-net.com/


Reply via email to