Prevent a future possible declaration-after-code error
authorVincent Pit <perl@profvince.com>
Mon, 6 Jun 2016 08:53:10 +0000 (10:53 +0200)
committerVincent Pit <perl@profvince.com>
Mon, 6 Jun 2016 08:53:37 +0000 (10:53 +0200)
Right now SU_HAS_NEW_CXT implies defined(gv_fetchsv), but better
make this more obvious.

Upper.xs

index 386bf5a..6ff176d 100644 (file)
--- 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