diff options
author | perl-5.8.0@ton.iguana.be <perl-5.8.0@ton.iguana.be> | 2005-02-06 22:03:20 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-02-08 14:02:56 +0000 |
commit | 28a4f200aaf4705198a8689fe5f7fabc732dc669 (patch) | |
tree | 581cce23ed56bb10f287b7b203a9b0bcd1644114 /pp_pack.c | |
parent | bec253151bb75227dc04006405395de6d40bec8c (diff) | |
download | perl-28a4f200aaf4705198a8689fe5f7fabc732dc669.tar.gz |
[perl #34076] P/p pack formats only recognize literal undef
From: perl-5.8.0@ton.iguana.be (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.0.11-34076-107344.19.3123360602169@perl.org>
p4raw-id: //depot/perl@23951
Diffstat (limited to 'pp_pack.c')
-rw-r--r-- | pp_pack.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -2685,8 +2685,8 @@ S_pack_rec(pTHX_ SV *cat, register tempsym_t* symptr, register SV **beglist, SV case 'p': while (len-- > 0) { fromstr = NEXTFROM; - if (fromstr == &PL_sv_undef) - aptr = NULL; + SvGETMAGIC(fromstr); + if (!SvOK(fromstr)) aptr = NULL; else { STRLEN n_a; /* XXX better yet, could spirit away the string to @@ -2702,9 +2702,9 @@ S_pack_rec(pTHX_ SV *cat, register tempsym_t* symptr, register SV **beglist, SV "Attempt to pack pointer to temporary value"); } if (SvPOK(fromstr) || SvNIOK(fromstr)) - aptr = SvPV(fromstr,n_a); + aptr = SvPV_flags(fromstr, n_a, 0); else - aptr = SvPV_force(fromstr,n_a); + aptr = SvPV_force_flags(fromstr, n_a, 0); } DO_BO_PACK_P(aptr); sv_catpvn(cat, (char*)&aptr, sizeof(char*)); |