Change 29535 by [EMAIL PROTECTED] on 2006/12/12 19:54:05
pads haven't actually contained any PVGVs since change 27313.
So correct the docs and assert this in the code.
Affected files ...
... //depot/perl/pad.c#101 edit
... //depot/perl/sv.c#1333 edit
Differences ...
==== //depot/perl/pad.c#101 (text) ====
Index: perl/pad.c
--- perl/pad.c#100~28086~ 2006-05-03 14:46:02.000000000 -0700
+++ perl/pad.c 2006-12-12 11:54:05.000000000 -0800
@@ -74,7 +74,7 @@
The SVs in the names AV have their PV being the name of the variable.
NV+1..IV inclusive is a range of cop_seq numbers for which the name is
valid. For typed lexicals name SV is SVt_PVMG and SvSTASH points at the
-type. For C<our> lexicals, the type is also SVt_PVGV, with the MAGIC slot
+type. For C<our> lexicals, the type is also SVt_PVMG, with the OURSTASH slot
pointing at the stash of the associated global (so that duplicate C<our>
declarations in the same package can be detected). SvCUR is sometimes
hijacked to store the generation number during compilation.
@@ -347,6 +347,7 @@
sv_setpv(namesv, name);
if (typestash) {
+ assert(SvTYPE(namesv) == SVt_PVMG);
SvPAD_TYPED_on(namesv);
SvSTASH_set(namesv, (HV*)SvREFCNT_inc_simple_NN((SV*)typestash));
}
==== //depot/perl/sv.c#1333 (text) ====
Index: perl/sv.c
--- perl/sv.c#1332~29494~ 2006-12-09 13:19:45.000000000 -0800
+++ perl/sv.c 2006-12-12 11:54:05.000000000 -0800
@@ -5102,6 +5102,7 @@
}
if (type >= SVt_PVMG) {
if ((type == SVt_PVMG || type == SVt_PVGV) && SvPAD_OUR(sv)) {
+ assert(type != SVt_PVGV);
SvREFCNT_dec(OURSTASH(sv));
} else if (SvMAGIC(sv))
mg_free(sv);
End of Patch.