From: Vincent Pit Date: Mon, 6 Jun 2016 08:53:10 +0000 (+0200) Subject: Prevent a future possible declaration-after-code error X-Git-Tag: rt112246^2~5 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=915ea103e7467eb15f3e5a37c4d4329a2803ea3a;p=perl%2Fmodules%2FScope-Upper.git Prevent a future possible declaration-after-code error Right now SU_HAS_NEW_CXT implies defined(gv_fetchsv), but better make this more obvious. --- diff --git a/Upper.xs b/Upper.xs index 386bf5a..6ff176d 100644 --- a/Upper.xs +++ b/Upper.xs @@ -911,10 +911,13 @@ static void su_localize(pTHX_ void *ud_) { #ifdef gv_fetchsv gv = gv_fetchsv(sv, GV_ADDMULTI, t); #else - STRLEN len; - const char *name = SvPV_const(sv, len); - gv = gv_fetchpvn_flags(name, len, GV_ADDMULTI, t); + { + STRLEN len; + const char *name = SvPV_const(sv, len); + gv = gv_fetchpvn_flags(name, len, GV_ADDMULTI, t); + } #endif + #if SU_HAS_NEW_CXT CX_CUR()->blk_oldcop = old_cop; #endif