diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-12-27 17:24:11 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-12-27 17:24:11 +0000 |
commit | e1234d8e95fb69a46c5f20bacb0c0cd2f1c325f7 (patch) | |
tree | 86c23138c28702e510e0556151eaa5ac242ec3df /universal.c | |
parent | ce5918c5d3196bf3677bfb7036754bffc30f8e0e (diff) | |
download | perl-e1234d8e95fb69a46c5f20bacb0c0cd2f1c325f7.tar.gz |
As what we're doing is generating subroutines, which are methods, we
need to invalidate cached methods. For constant.pm we need to create
&Internals::inc_sub_generation
p4raw-id: //depot/perl@26502
Diffstat (limited to 'universal.c')
-rw-r--r-- | universal.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/universal.c b/universal.c index 24aa3b8e48..5c147b675a 100644 --- a/universal.c +++ b/universal.c @@ -199,6 +199,7 @@ XS(XS_Regexp_DESTROY); XS(XS_Internals_hash_seed); XS(XS_Internals_rehash_seed); XS(XS_Internals_HvREHASH); +XS(XS_Internals_inc_sub_generation); void Perl_boot_core_UNIVERSAL(pTHX) @@ -247,6 +248,8 @@ Perl_boot_core_UNIVERSAL(pTHX) newXSproto("Internals::hash_seed",XS_Internals_hash_seed, file, ""); newXSproto("Internals::rehash_seed",XS_Internals_rehash_seed, file, ""); newXSproto("Internals::HvREHASH", XS_Internals_HvREHASH, file, "\\%"); + newXSproto("Internals::inc_sub_generation",XS_Internals_inc_sub_generation, + file, ""); } @@ -949,6 +952,17 @@ XS(XS_Internals_HvREHASH) /* Subject to change */ Perl_croak(aTHX_ "Internals::HvREHASH $hashref"); } +XS(XS_Internals_inc_sub_generation) +{ + /* Using dXSARGS would also have dITEM and dSP, + * which define 2 unused local variables. */ + dAXMARK; + PERL_UNUSED_ARG(cv); + PERL_UNUSED_VAR(mark); + ++PL_sub_generation; + XSRETURN_EMPTY; +} + /* * Local variables: * c-indentation-style: bsd |