diff options
author | David Mitchell <davem@iabyn.com> | 2017-07-03 17:07:28 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2017-07-27 11:30:21 +0100 |
commit | 5a6c28370397ad3d5c138df5778833dc4b11c3be (patch) | |
tree | 220b9b186bb82e9ed21290c3f93130b906e3ba27 /sv.h | |
parent | 0283ad960acb937e9387b3323f1f7852c2adb0fa (diff) | |
download | perl-5a6c28370397ad3d5c138df5778833dc4b11c3be.tar.gz |
add PL_sv_zero
it's like PL_sv_no, except that its string value is "0" rather than "".
It can be used for example where pp function wants to push a zero return
value on the stack. The next commit will start to use it.
Also update the SvIMMORTAL() to be more efficient: it now checks whether
the SV's address is in a range rather than individually checking against
&PL_sv_undef, &PL_sv_no etc.
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2087,7 +2087,7 @@ properly null terminated. Equivalent to sv_setpvs(""), but more efficient. #define SvPEEK(sv) "" #endif -#define SvIMMORTAL(sv) (SvREADONLY(sv) && ((sv)==&PL_sv_undef || (sv)==&PL_sv_yes || (sv)==&PL_sv_no || (sv)==&PL_sv_placeholder)) +#define SvIMMORTAL(sv) (SvREADONLY(sv) && ((sv)==&PL_sv_undef || (sv)==&PL_sv_yes || (sv)==&PL_sv_no || (sv)==&PL_sv_zero || (sv)==&PL_sv_placeholder)) #ifdef DEBUGGING /* exercise the immortal resurrection code in sv_free2() */ |