This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
sv.c: Turn a FIXME comment into an explanation
authorFather Chrysostomos <sprout@cpan.org>
Mon, 28 Nov 2011 02:37:14 +0000 (18:37 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 28 Nov 2011 02:37:14 +0000 (18:37 -0800)
sv.c

diff --git a/sv.c b/sv.c
index caf2100..93462a7 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -3645,8 +3645,8 @@ S_glob_assign_glob(pTHX_ SV *const dstr, SV *const sstr, const int dtype)
            }
            SvUPGRADE(dstr, SVt_PVGV);
            (void)SvOK_off(dstr);
-           /* FIXME - why are we doing this, then turning it off and on again
-              below */
+           /* We have to turn this on here (even though we turn it off
+              below, as GvSTASH will fail an assertion otherwise. */
            isGV_with_GP_on(dstr);
        }
        GvSTASH(dstr) = GvSTASH(sstr);
@@ -3711,7 +3711,7 @@ S_glob_assign_glob(pTHX_ SV *const dstr, SV *const sstr, const int dtype)
     }
 
     gp_free(MUTABLE_GV(dstr));
-    isGV_with_GP_off(dstr);
+    isGV_with_GP_off(dstr); /* SvOK_off does not like globs. */
     (void)SvOK_off(dstr);
     isGV_with_GP_on(dstr);
     GvINTRO_off(dstr);         /* one-shot flag */