Split out the use of SVp_SCREAM for GVs with GPs into a new symbolic
[p5sagit/p5-mst-13.2.git] / mg.c
diff --git a/mg.c b/mg.c
index 39117e2..b0af1c8 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -1897,8 +1897,7 @@ Perl_magic_setglob(pTHX_ SV *sv, MAGIC *mg)
 
     if (!SvOK(sv))
        return 0;
-    if (SvFLAGS(sv) & SVp_SCREAM
-       && (SvTYPE(sv) == SVt_PVGV || SvTYPE(sv) == SVt_PVGV)) {
+    if (isGV_with_GP(sv)) {
        /* We're actually already a typeglob, so don't need the stuff below.
         */
        return 0;