Change 29852 by [EMAIL PROTECTED] on 2007/01/17 15:42:54
If we use SvUPGRADE() rather than sv_upgrade() then it can make the
decision on not "up"grading PVLV to PVGV for us. However, it appears
that the other actions conducted for "not-yet-a-glob" are useful here.
Affected files ...
... //depot/perl/sv.c#1352 edit
Differences ...
==== //depot/perl/sv.c#1352 (text) ====
Index: perl/sv.c
--- perl/sv.c#1351~29837~ 2007-01-15 10:19:20.000000000 -0800
+++ perl/sv.c 2007-01-17 07:42:54.000000000 -0800
@@ -3171,15 +3171,14 @@
if (dtype != SVt_PVGV) {
const char * const name = GvNAME(sstr);
const STRLEN len = GvNAMELEN(sstr);
- /* don't upgrade SVt_PVLV: it can hold a glob */
- if (dtype != SVt_PVLV) {
+ {
if (dtype >= SVt_PV) {
SvPV_free(dstr);
SvPV_set(dstr, 0);
SvLEN_set(dstr, 0);
SvCUR_set(dstr, 0);
}
- sv_upgrade(dstr, SVt_PVGV);
+ SvUPGRADE(dstr, SVt_PVGV);
(void)SvOK_off(dstr);
/* FIXME - why are we doing this, then turning it off and on again
below? */
End of Patch.