This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
rename DM_ARRAY flag to DM_ARRAY_ISA
authorDavid Mitchell <davem@iabyn.com>
Fri, 4 Jun 2010 20:25:07 +0000 (21:25 +0100)
committerDavid Mitchell <davem@iabyn.com>
Fri, 4 Jun 2010 20:25:07 +0000 (21:25 +0100)
This better represents its current role as specifically delaying magic on
@ISA as opposed to a general array magic delay mechanism.

av.c
gv.h
mg.c
pp.c
pp_hot.c

diff --git a/av.c b/av.c
index 219870c..6e45b95 100644 (file)
--- a/av.c
+++ b/av.c
@@ -365,7 +365,7 @@ Perl_av_store(pTHX_ register AV *av, I32 key, SV *val)
            sv_magic(val, MUTABLE_SV(av), toLOWER(mg->mg_type), 0, key);
        }
        if (PL_delaymagic && mg->mg_type == PERL_MAGIC_isa)
-           PL_delaymagic |= DM_ARRAY;
+           PL_delaymagic |= DM_ARRAY_ISA;
        else
           mg_set(MUTABLE_SV(av));
     }
@@ -446,7 +446,7 @@ Perl_av_clear(pTHX_ register AV *av)
     if (SvRMAGICAL(av)) {
        const MAGIC* const mg = SvMAGIC(av);
        if (PL_delaymagic && mg && mg->mg_type == PERL_MAGIC_isa)
-           PL_delaymagic |= DM_ARRAY;
+           PL_delaymagic |= DM_ARRAY_ISA;
         else
            mg_clear(MUTABLE_SV(av)); 
     }
diff --git a/gv.h b/gv.h
index 7e412e5..4286491 100644 (file)
--- a/gv.h
+++ b/gv.h
@@ -171,7 +171,7 @@ Return the SV from the GV.
 #define DM_UID   0x003
 #define DM_RUID   0x001
 #define DM_EUID   0x002
-#define DM_ARRAY 0x004
+#define DM_ARRAY_ISA 0x004
 #define DM_GID   0x030
 #define DM_RGID   0x010
 #define DM_EGID   0x020
diff --git a/mg.c b/mg.c
index 7c7c03e..24561a2 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -1557,7 +1557,7 @@ Perl_magic_setisa(pTHX_ SV *sv, MAGIC *mg)
     PERL_UNUSED_ARG(sv);
 
     /* Skip _isaelem because _isa will handle it shortly */
-    if (PL_delaymagic & DM_ARRAY && mg->mg_type == PERL_MAGIC_isaelem)
+    if (PL_delaymagic & DM_ARRAY_ISA && mg->mg_type == PERL_MAGIC_isaelem)
        return 0;
 
     return magic_clearisa(NULL, mg);
diff --git a/pp.c b/pp.c
index 2649c7e..4c98581 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -5349,7 +5349,7 @@ PP(pp_push)
                sv_setsv(sv, *MARK);
            av_store(ary, AvFILLp(ary)+1, sv);
        }
-       if (PL_delaymagic & DM_ARRAY)
+       if (PL_delaymagic & DM_ARRAY_ISA)
            mg_set(MUTABLE_SV(ary));
 
        PL_delaymagic = 0;
index 0607b76..1a7c13f 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1048,7 +1048,7 @@ PP(pp_aassign)
                }
                TAINT_NOT;
            }
-           if (PL_delaymagic & DM_ARRAY)
+           if (PL_delaymagic & DM_ARRAY_ISA)
                SvSETMAGIC(MUTABLE_SV(ary));
            break;
        case SVt_PVHV: {                                /* normal hash */