summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorMarcus Holland-Moritz <mhx-perl@gmx.net>2003-07-21 00:36:02 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2003-07-27 15:48:20 +0000
commit7996736c5ecb6da6273386229ce113837049152c (patch)
tree8890e38e9c2e349f70832a77e853ad6672182d1d /dump.c
parent2edcda664a46cf47ed5ee5520834c7e424efc8fd (diff)
downloadperl-7996736c5ecb6da6273386229ce113837049152c.tar.gz
Re: [PATCH] Re: Storing &PL_sv_undef as a hash key with perl-5.8.x
From: "Marcus Holland-Moritz" <mhx-perl@gmx.net> Message-ID: <006801c34efe$8aac1920$0c2f1fac@R2D2> p4raw-id: //depot/perl@20224
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/dump.c b/dump.c
index d6b65580cb..52a43a9af4 100644
--- a/dump.c
+++ b/dump.c
@@ -160,7 +160,7 @@ Perl_sv_peek(pTHX_ SV *sv)
sv_catpv(t, "WILD");
goto finish;
}
- else if (sv == &PL_sv_undef || sv == &PL_sv_no || sv == &PL_sv_yes) {
+ else if (sv == &PL_sv_undef || sv == &PL_sv_no || sv == &PL_sv_yes || sv == &PL_sv_placeholder) {
if (sv == &PL_sv_undef) {
sv_catpv(t, "SV_UNDEF");
if (!(SvFLAGS(sv) & (SVf_OK|SVf_OOK|SVs_OBJECT|
@@ -178,7 +178,7 @@ Perl_sv_peek(pTHX_ SV *sv)
SvNVX(sv) == 0.0)
goto finish;
}
- else {
+ else if (sv == &PL_sv_yes) {
sv_catpv(t, "SV_YES");
if (!(SvFLAGS(sv) & (SVf_ROK|SVf_OOK|SVs_OBJECT|
SVs_GMG|SVs_SMG|SVs_RMG)) &&
@@ -189,6 +189,13 @@ Perl_sv_peek(pTHX_ SV *sv)
SvNVX(sv) == 1.0)
goto finish;
}
+ else {
+ sv_catpv(t, "SV_PLACEHOLDER");
+ if (!(SvFLAGS(sv) & (SVf_OK|SVf_OOK|SVs_OBJECT|
+ SVs_GMG|SVs_SMG|SVs_RMG)) &&
+ SvREADONLY(sv))
+ goto finish;
+ }
sv_catpv(t, ":");
}
else if (SvREFCNT(sv) == 0) {