diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-05-22 22:22:32 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-05-23 00:56:11 -0700 |
commit | 6697815661d775deb113dbdbc2e6822d55d3522b (patch) | |
tree | ec378137a15c53b6e93dd6d0597ab3fd8f1952ae /gv.c | |
parent | ce9f52adaabc1b017e07815147af86476576e92d (diff) | |
download | perl-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.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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]; |