summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-05-22 22:22:32 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-05-23 00:56:11 -0700
commit6697815661d775deb113dbdbc2e6822d55d3522b (patch)
treeec378137a15c53b6e93dd6d0597ab3fd8f1952ae /gv.c
parentce9f52adaabc1b017e07815147af86476576e92d (diff)
downloadperl-6697815661d775deb113dbdbc2e6822d55d3522b.tar.gz
Excise PL_amagic_generation
The core is not using it any more. Every CPAN module that increments it also does newXS, which triggers mro_method_changed_in, which is sufficient; so nothing will break. So, to keep those modules compiling, PL_amagic_generation is now an alias to PL_na outside the core.
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c7
1 files changed, 2 insertions, 5 deletions
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];