]> git.vpit.fr Git - perl/modules/Scope-Upper.git/blobdiff - Upper.xs
Properly vivify nonexistent glob slots
[perl/modules/Scope-Upper.git] / Upper.xs
index 42f457e4302a5f46294c457612e79477aafb1634..20fa5d662013c10dc685bd656fee919a9753c3b9 100644 (file)
--- a/Upper.xs
+++ b/Upper.xs
@@ -283,7 +283,6 @@ STATIC void su_call(pTHX_ void *ud_) {
  su_ud_reap *ud = (su_ud_reap *) ud_;
 #if SU_HAS_PERL(5, 9, 5)
  PERL_CONTEXT saved_cx;
- I32 dieing = PL_op->op_type == OP_DIE;
  I32 cxix;
 #endif
 
@@ -305,20 +304,17 @@ STATIC void su_call(pTHX_ void *ud_) {
   * the sub scope from call_sv, although it's still needed in our caller. */
 
 #if SU_HAS_PERL(5, 9, 5)
- if (dieing) {
-  if (cxstack_ix < cxstack_max)
-   cxix = cxstack_ix + 1;
-  else
-   cxix = Perl_cxinc(aTHX);
-  saved_cx = cxstack[cxix];
- }
+ if (cxstack_ix < cxstack_max)
+  cxix = cxstack_ix + 1;
+ else
+  cxix = Perl_cxinc(aTHX);
+ saved_cx = cxstack[cxix];
 #endif
 
  call_sv(ud->cb, G_VOID);
 
 #if SU_HAS_PERL(5, 9, 5)
- if (dieing)
-  cxstack[cxix] = saved_cx;
+ cxstack[cxix] = saved_cx;
 #endif
 
  PUTBACK;
@@ -425,11 +421,11 @@ STATIC void su_localize(pTHX_ void *ud_) {
   gv = (GV *) sv;
  } else {
 #ifdef gv_fetchsv
-  gv = gv_fetchsv(sv, GV_ADDMULTI, SVt_PVGV);
+  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, SVt_PVGV);
+  gv = gv_fetchpvn_flags(name, len, GV_ADDMULTI, t);
 #endif
  }