diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-11-25 13:53:28 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-11-25 13:53:28 +0000 |
commit | a3179684398978e8bf4afba360eb728e4215d751 (patch) | |
tree | c40ed61c5b3f5d74e8abcffa0547e99d27aecdef /pod/perlguts.pod | |
parent | 2456140e9cfda88ed22ea1c7290a61234c84aea6 (diff) | |
download | perl-a3179684398978e8bf4afba360eb728e4215d751.tar.gz |
Use newSVpvs_flags() instead of sv_2mortal(newSVpvs())
And similarly for newSVpvn() for a known length.
Diffstat (limited to 'pod/perlguts.pod')
-rw-r--r-- | pod/perlguts.pod | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pod/perlguts.pod b/pod/perlguts.pod index 00df2550f4..8327db2c41 100644 --- a/pod/perlguts.pod +++ b/pod/perlguts.pod @@ -1450,6 +1450,8 @@ L</Reference Counts and Mortality>): PUSHs(sv_2mortal(newSVuv(an_unsigned_integer))) PUSHs(sv_2mortal(newSVnv(a_double))) PUSHs(sv_2mortal(newSVpv("Some String",0))) + /* Although the last example is better written as the more efficient: */ + PUSHs(newSVpvs_flags("Some String", SVs_TEMP)) And now the Perl program calling C<tzname>, the two values will be assigned as in: |