diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-03-29 20:05:06 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-03-29 20:06:53 +0100 |
commit | d5cecc0e63763303f92fca7bf1a36257b273dea9 (patch) | |
tree | c5a236ff11d767cd7e1083a6805d6e01e72db99c /universal.c | |
parent | 99ab892b6470bcd28bad5512a942b608496ebf8f (diff) | |
download | perl-d5cecc0e63763303f92fca7bf1a36257b273dea9.tar.gz |
Change Regexp::DESTROY to be a constant subroutine, removing XS_Regexp_DESTROY.
A constant subroutine is now optimised away at DESTROY time.
Diffstat (limited to 'universal.c')
-rw-r--r-- | universal.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/universal.c b/universal.c index 61398fe4d1..6041c6df71 100644 --- a/universal.c +++ b/universal.c @@ -233,7 +233,6 @@ XS(XS_Internals_SvREADONLY); XS(XS_Internals_SvREFCNT); XS(XS_Internals_hv_clear_placehold); XS(XS_PerlIO_get_layers); -XS(XS_Regexp_DESTROY); XS(XS_Internals_hash_seed); XS(XS_Internals_rehash_seed); XS(XS_Internals_HvREHASH); @@ -297,7 +296,8 @@ Perl_boot_core_UNIVERSAL(pTHX) XS_Internals_hv_clear_placehold, file, "\\%"); newXSproto("PerlIO::get_layers", XS_PerlIO_get_layers, file, "*;@"); - newXS("Regexp::DESTROY", XS_Regexp_DESTROY, file); + CvFILE(newCONSTSUB(get_hv("Regexp::", GV_ADD), "DESTROY", NULL)) + = (char *)file; 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, "\\%"); @@ -926,12 +926,6 @@ XS(XS_Internals_hv_clear_placehold) } } -XS(XS_Regexp_DESTROY) -{ - PERL_UNUSED_CONTEXT; - PERL_UNUSED_ARG(cv); -} - XS(XS_PerlIO_get_layers) { dVAR; |