]> git.vpit.fr Git - perl/modules/Scope-Upper.git/blobdiff - Upper.xs
SU_GET_CONTEXT() only needs to skip DB frames when no context was passed
[perl/modules/Scope-Upper.git] / Upper.xs
index 73bf6e776b6b1336da7a6f3be59c81679869f6a8..b6e473da5a1cca7be75748f690441bee6e2ce1ce 100644 (file)
--- a/Upper.xs
+++ b/Upper.xs
@@ -647,10 +647,11 @@ STATIC void su_unwind(pTHX_ void *ud_) {
     cxix = 0;                  \
    else if (cxix > cxstack_ix) \
     cxix = cxstack_ix;         \
-  } else                       \
+  } else {                     \
    cxix = cxstack_ix;          \
-  if (PL_DBsub)                \
-   SU_SKIP_DB(cxix);           \
+   if (PL_DBsub)               \
+    SU_SKIP_DB(cxix);          \
+  }                            \
  } STMT_END
 
 XS(XS_Scope__Upper_unwind); /* prototype to pass -Wmissing-prototypes */
@@ -744,19 +745,6 @@ CODE:
 OUTPUT:
  RETVAL
 
-SV *
-DOWN(...)
-PROTOTYPE: ;$
-PREINIT:
- I32 cxix;
-CODE:
- SU_GET_CONTEXT(0, 0);
- if (++cxix > cxstack_ix)
-  cxix = cxstack_ix;
- RETVAL = newSViv(cxix);
-OUTPUT:
- RETVAL
-
 void
 SUB(...)
 PROTOTYPE: ;$