From: Nicholas Clark Date: Sun, 29 Mar 2009 19:05:06 +0000 (+0100) Subject: Change Regexp::DESTROY to be a constant subroutine, removing XS_Regexp_DESTROY. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d5cecc0e63763303f92fca7bf1a36257b273dea9;p=p5sagit%2Fp5-mst-13.2.git Change Regexp::DESTROY to be a constant subroutine, removing XS_Regexp_DESTROY. A constant subroutine is now optimised away at DESTROY time. --- diff --git a/universal.c b/universal.c index 61398fe..6041c6d 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;