]> git.vpit.fr Git - perl/modules/Scope-Upper.git/blobdiff - Upper.xs
Also apply the context overwrite workaround when not under OP_DIE
[perl/modules/Scope-Upper.git] / Upper.xs
index 42f457e4302a5f46294c457612e79477aafb1634..bb1150c34c1d1b9352a7094d6847a8e0f18a68fd 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;