develooper Front page | perl.perl5.porters | Postings from November 1999

Re: [ID 19991118.009] small problem

Thread Previous
From:
Nick Ing-Simmons
Date:
November 18, 1999 13:58
Subject:
Re: [ID 19991118.009] small problem
Message ID:
199911182157.VAA00681@bactrian.ni-s.u-net.com
Kevin Ryan <kevinr@col.hp.com> writes:
>I was in:
>
>http://www.perl.com/CPAN-local/doc/manual/html/pod/perlembed.html#Compiling_your_C_program

That documents up-to-date perl i.e. perl5.005+

>
>and I had trouble compiling the string.c example.  Specifically the
>line:
>
>printf("a = %s\n", SvPV(perl_get_sv("a", FALSE), PL_na));
>
>was the trouble maker.  PL_na was undefined.  I did, however, find:
>
>/opt/perl5/lib/CORE/perl.h:EXT STRLEN na;               /* for use in
>SvPV when length is Not Applicable */
>
>So I changed the line to the following and it compiles/runs just fine.
>
>printf("a = %s\n", SvPV(perl_get_sv("a", FALSE), na));
>
>------------------------------------------------------------
>perl -V gives:
>Summary of my perl5 (5.0 patchlevel 4 subversion 4) configuration:

Yes for old perl5.00404 it used to be called 'na' - we changed it 
so that all the variable names are consistently prefixed PL_ to avoid
clashes with user variables. While 'na' may not be too much of a problem
'dirty' and serveral others were a real problem.

-- 
Nick Ing-Simmons


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About