From 9a62b98f29d24f2f699a5e6d46641ac9fe8f9652 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sun, 10 Jun 2012 11:17:40 -0700 Subject: [PATCH] =?utf8?q?gv.c:=20Don=E2=80=99t=20ENTER/LEAVE=20unnecessar?= =?utf8?q?ily?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Commit 756cb47730 added an if/else block in between ENTER/LEAVE, mov- ing the existing code into the else block. But the if code (consist- ing of newCONSTSUB) never needed to be surrounded by ENTER/LEAVE. --- gv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gv.c b/gv.c index 020e2a2..469d46a 100644 --- a/gv.c +++ b/gv.c @@ -370,7 +370,6 @@ Perl_gv_init_pvn(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, U32 flag GvMULTI_on(gv); /* _was_ mentioned */ if (doproto) { /* Replicate part of newSUB here. */ CV *cv; - ENTER; if (has_constant) { /* newCONSTSUB takes ownership of the reference from us. */ cv = newCONSTSUB_flags(stash, name, len, flags, has_constant); @@ -384,11 +383,12 @@ Perl_gv_init_pvn(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, U32 flag if (exported_constant) GvIMPORTED_CV_on(gv); } else { + ENTER; (void) start_subparse(0,0); /* Create empty CV in compcv. */ cv = PL_compcv; GvCV_set(gv,cv); + LEAVE; } - LEAVE; mro_method_changed_in(GvSTASH(gv)); /* sub Foo::bar($) { (shift) } sub ASDF::baz($); *ASDF::baz = \&Foo::bar */ CvGV_set(cv, gv); -- 1.8.3.1