summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embedvar.h1
-rw-r--r--ext/B/B.pm2
-rw-r--r--gv.c7
-rw-r--r--intrpvar.h2
-rw-r--r--perl.h4
-rw-r--r--sv.c2
6 files changed, 6 insertions, 12 deletions
diff --git a/embedvar.h b/embedvar.h
index 24d99e9610..c4a0fa9042 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -95,7 +95,6 @@
#define PL_XPosixSpace (vTHX->IXPosixSpace)
#define PL_XPosixXDigit (vTHX->IXPosixXDigit)
#define PL_Xpv (vTHX->IXpv)
-#define PL_amagic_generation (vTHX->Iamagic_generation)
#define PL_an (vTHX->Ian)
#define PL_apiversion (vTHX->Iapiversion)
#define PL_argvgv (vTHX->Iargvgv)
diff --git a/ext/B/B.pm b/ext/B/B.pm
index 75ead53a15..7507c40c8f 100644
--- a/ext/B/B.pm
+++ b/ext/B/B.pm
@@ -405,6 +405,8 @@ underlying structures are freed.
=item amagic_generation
Returns the SV object corresponding to the C variable C<amagic_generation>.
+As of Perl 5.18, this is just an alias to C<PL_na>, so its value is
+meaningless.
=item init_av
diff --git a/gv.c b/gv.c
index 89a672cd74..8248bfefac 100644
--- a/gv.c
+++ b/gv.c
@@ -2243,8 +2243,7 @@ Perl_Gv_AMupdate(pTHX_ HV *stash, bool destructing)
newgen = PL_sub_generation + stash_meta->pkg_gen + stash_meta->cache_gen;
if (mg) {
const AMT * const amtp = (AMT*)mg->mg_ptr;
- if (amtp->was_ok_am == PL_amagic_generation
- && amtp->was_ok_sub == newgen) {
+ if (amtp->was_ok_sub == newgen) {
return AMT_OVERLOADED(amtp) ? 1 : 0;
}
sv_unmagic(MUTABLE_SV(stash), PERL_MAGIC_overload_table);
@@ -2253,7 +2252,6 @@ Perl_Gv_AMupdate(pTHX_ HV *stash, bool destructing)
DEBUG_o( Perl_deb(aTHX_ "Recalcing overload magic in package %s\n",HvNAME_get(stash)) );
Zero(&amt,1,AMT);
- amt.was_ok_am = PL_amagic_generation;
amt.was_ok_sub = newgen;
amt.fallback = AMGfallNO;
amt.flags = 0;
@@ -2415,8 +2413,7 @@ Perl_gv_handler(pTHX_ HV *stash, I32 id)
}
assert(mg);
amtp = (AMT*)mg->mg_ptr;
- if ( amtp->was_ok_am != PL_amagic_generation
- || amtp->was_ok_sub != newgen )
+ if ( amtp->was_ok_sub != newgen )
goto do_update;
if (AMT_AMAGIC(amtp)) {
CV * const ret = amtp->table[id];
diff --git a/intrpvar.h b/intrpvar.h
index cc9e46eded..56435d6e12 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -533,8 +533,6 @@ PERLVAR(I, debug, VOL U32) /* flags given to -D switch */
/* Perl_Ibreakable_sub_generation_ptr was too long for VMS, hence "gen" */
PERLVARI(I, breakable_sub_gen, U32, 0)
-PERLVARI(I, amagic_generation, long, 0)
-
#ifdef USE_LOCALE_COLLATE
PERLVAR(I, collation_name, char *) /* Name of current collation */
PERLVAR(I, collxfrm_base, Size_t) /* Basic overhead in *xfrm() */
diff --git a/perl.h b/perl.h
index e532af2637..29d4fa1363 100644
--- a/perl.h
+++ b/perl.h
@@ -4776,6 +4776,8 @@ EXTCONST char *const PL_phase_names[];
* instead of using the newer PL_phase, which provides everything PL_dirty
* provided, and more. */
# define PL_dirty (PL_phase == PERL_PHASE_DESTRUCT)
+
+# define PL_amagic_generation PL_na
#endif /* !PERL_CORE */
END_EXTERN_C
@@ -5164,7 +5166,6 @@ struct am_table {
U8 fallback;
U16 spare;
U32 was_ok_sub;
- long was_ok_am;
CV* table[NofAMmeth];
};
struct am_table_short {
@@ -5172,7 +5173,6 @@ struct am_table_short {
U8 fallback;
U16 spare;
U32 was_ok_sub;
- long was_ok_am;
};
typedef struct am_table AMT;
typedef struct am_table_short AMTS;
diff --git a/sv.c b/sv.c
index 1f5e2f0ba4..c96a81d948 100644
--- a/sv.c
+++ b/sv.c
@@ -13056,8 +13056,6 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
PL_hints = proto_perl->Ihints;
- PL_amagic_generation = proto_perl->Iamagic_generation;
-
#ifdef USE_LOCALE_COLLATE
PL_collation_ix = proto_perl->Icollation_ix;
PL_collation_standard = proto_perl->Icollation_standard;