p4raw-id: //depot/perl@2201
#define PUSHSTACK PUSHSTACKi(PERLSI_UNKNOWN)
-/* POPSTACK works with PL_stack_sp, so any local sp modifications may
- * need to be flushed with a PUTBACK */
+/* POPSTACK works with PL_stack_sp, so it may need to be bracketed by
+ * PUTBACK/SPAGAIN to flush/refresh any local SP that may be active */
#define POPSTACK \
STMT_START { \
djSP; \
G_DISCARD|G_EVAL|G_KEEPERR);
SvREFCNT(sv)--;
POPSTACK;
+ SPAGAIN;
LEAVE;
}
} while (SvOBJECT(sv) && SvSTASH(sv) != stash);