summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-11-27 17:02:44 -0800
committerFather Chrysostomos <sprout@cpan.org>2014-11-30 11:48:39 -0800
commit53af8ccbd2539275a6da9742a1279817c92c8594 (patch)
tree702783ac4b9ccb58f9a9c7c3b6db28b248aafac2
parentaa572f37468bc3a5a004bcb1ec555270d144d0bd (diff)
downloadperl-53af8ccbd2539275a6da9742a1279817c92c8594.tar.gz
Prepare B::Concise for upcoming pad name changes
When pad names become their own type, separate from SVs, the ‘immor- tal’ pad names, &PL_padname_undef and &PL_padname_const (to replace &PL_sv_undef and &PL_sv_no), will no longer be B::SPECIAL objects, but B::PADNAMEs. The way to distinguish them is to check the length. This method happens to work both before and after the pad name changes.
-rw-r--r--ext/B/B/Concise.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/B/B/Concise.pm b/ext/B/B/Concise.pm
index 47082e8cdb..dcca4af4ef 100644
--- a/ext/B/B/Concise.pm
+++ b/ext/B/B/Concise.pm
@@ -789,7 +789,9 @@ sub concise_op {
for my $i (0..$count-1) {
my ($targarg, $targarglife);
my $padname = (($curcv->PADLIST->ARRAY)[0]->ARRAY)[$h{targ}+$i];
- if (defined $padname and class($padname) ne "SPECIAL") {
+ if (defined $padname and class($padname) ne "SPECIAL" and
+ $padname->LEN)
+ {
$targarg = $padname->PVX;
if ($padname->FLAGS & SVf_FAKE) {
# These changes relate to the jumbo closure fix.