diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 2000-12-15 00:26:57 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-15 15:38:30 +0000 |
commit | 32251b26ec0781f53d9925938cad5bd9e89c80f2 (patch) | |
tree | b4e269ef285eacd12a1e4b19ce557bccc7c14590 /sv.c | |
parent | 89ffc314668a83ba2b452e1498a0e37c4453876e (diff) | |
download | perl-32251b26ec0781f53d9925938cad5bd9e89c80f2.tar.gz |
speeding up object creation/destruction 4x times
Message-ID: <20001215052657.A8319@math.mps.ohio-state.edu>
p4raw-id: //depot/perl@8131
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -3721,7 +3721,7 @@ Perl_sv_clear(pTHX_ register SV *sv) if (SvOBJECT(sv)) { if (PL_defstash) { /* Still have a symbol table? */ djSP; - GV* destructor; + CV* destructor; SV tmpref; Zero(&tmpref, 1, SV); @@ -3730,9 +3730,9 @@ Perl_sv_clear(pTHX_ register SV *sv) SvREADONLY_on(&tmpref); /* DESTROY() could be naughty */ SvREFCNT(&tmpref) = 1; - do { + do { stash = SvSTASH(sv); - destructor = gv_fetchmethod(SvSTASH(sv), "DESTROY"); + destructor = StashHANDLER(stash,DESTROY); if (destructor) { ENTER; PUSHSTACKi(PERLSI_DESTROY); @@ -3741,8 +3741,7 @@ Perl_sv_clear(pTHX_ register SV *sv) PUSHMARK(SP); PUSHs(&tmpref); PUTBACK; - call_sv((SV*)GvCV(destructor), - G_DISCARD|G_EVAL|G_KEEPERR); + call_sv((SV*)destructor, G_DISCARD|G_EVAL|G_KEEPERR); SvREFCNT(sv)--; POPSTACK; SPAGAIN; |