# define HvNAME_get(H) HvNAME(H)
#endif
+#ifndef ENTER_with_name
+# define ENTER_with_name(N) ENTER
+#endif
+
+#ifndef LEAVE_with_name
+# define LEAVE_with_name(N) LEAVE
+#endif
+
#ifndef gv_fetchpvn_flags
# define gv_fetchpvn_flags(A, B, C, D) gv_fetchpv((A), (C), (D))
#endif
PUSHMARK(SP);
PUTBACK;
- /* If cxstack_ix isn't incremented there, the eval context will be overwritten
- * when the new sub scope will be created in call_sv. */
+ /* If the recently popped context isn't saved there, it will be overwritten by
+ * the sub scope from call_sv, although it's still needed in our caller. */
#if SU_HAS_PERL(5, 9, 5)
if (dieing) {
#define su_init(L, U, S) su_init(aTHX_ (L), (U), (S))
I32 i, depth = 0, *origin;
- LEAVE;
+ LEAVE_with_name("sub");
if (cxix >= cxstack_ix) {
SU_UD_HANDLER(ud)(aTHX_ ud);
SAVEDESTRUCTOR_X(su_pop, ud);
done:
- ENTER;
+ ENTER_with_name("sub");
return depth;
}