I32 oldscope;
AV* comppadlist;
dJMPENV;
+ int ret;
#ifdef SETUID_SCRIPTS_ARE_SECURE_NOW
#ifdef IAMSUID
time(&basetime);
oldscope = scopestack_ix;
- switch (JMPENV_PUSH) {
+ JMPENV_PUSH(ret);
+ switch (ret) {
case 1:
STATUS_ALL_FAILURE;
/* FALL THROUGH */
perl_run(sv_interp)
PerlInterpreter *sv_interp;
{
- dJMPENV;
I32 oldscope;
+ dJMPENV;
+ int ret;
if (!(curinterp = sv_interp))
return 255;
oldscope = scopestack_ix;
- switch (JMPENV_PUSH) {
+ JMPENV_PUSH(ret);
+ switch (ret) {
case 1:
cxstack_ix = -1; /* start context stack again */
break;
static CV *DBcv;
bool oldcatch = CATCH_GET;
dJMPENV;
+ int ret;
if (flags & G_DISCARD) {
ENTER;
}
markstack_ptr++;
- switch (JMPENV_PUSH) {
+ JMPENV_PUSH(ret);
+ switch (ret) {
case 0:
break;
case 1:
I32 retval;
I32 oldscope;
dJMPENV;
+ int ret;
if (flags & G_DISCARD) {
ENTER;
if (flags & G_KEEPERR)
myop.op_flags |= OPf_SPECIAL;
- switch (JMPENV_PUSH) {
+ JMPENV_PUSH(ret);
+ switch (ret) {
case 0:
break;
case 1:
I32 oldscope;
AV* list;
{
- dJMPENV;
- STRLEN len;
line_t oldline = curcop->cop_line;
+ STRLEN len;
+ dJMPENV;
+ int ret;
while (AvFILL(list) >= 0) {
CV *cv = (CV*)av_shift(list);
SAVEFREESV(cv);
- switch (JMPENV_PUSH) {
+ JMPENV_PUSH(ret);
+ switch (ret) {
case 0: {
SV* atsv = GvSV(errgv);
PUSHMARK(stack_sp);
assert(CATCH_GET == TRUE);
DEBUG_l(deb("(Setting up local jumplevel, runlevel = %d)\n", runlevel+1));
#endif
- switch ((ret = JMPENV_PUSH)) {
+ JMPENV_PUSH(ret);
+ switch (ret) {
default: /* topmost level handles it */
JMPENV_POP;
runlevel = oldrunlevel;
typedef struct jmpenv JMPENV;
#define dJMPENV JMPENV cur_env
-#define JMPENV_PUSH (cur_env.je_prev = top_env, \
- cur_env.je_ret = Sigsetjmp(cur_env.je_buf,1), \
- top_env = &cur_env, \
- cur_env.je_mustcatch = FALSE, \
- cur_env.je_ret)
-#define JMPENV_POP (top_env = cur_env.je_prev)
-#define JMPENV_JUMP(v) (top_env->je_prev ? Siglongjmp(top_env->je_buf, (v)) \
- : ((v) == 2) ? exit(STATUS_NATIVE_EXPORT) \
- : (PerlIO_printf(PerlIO_stderr(), "panic: top_env\n"), \
- exit(1)))
+#define JMPENV_PUSH(v) \
+ STMT_START { \
+ cur_env.je_prev = top_env; \
+ cur_env.je_ret = Sigsetjmp(cur_env.je_buf, 1); \
+ top_env = &cur_env; \
+ cur_env.je_mustcatch = FALSE; \
+ (v) = cur_env.je_ret; \
+ } STMT_END
+#define JMPENV_POP \
+ STMT_START { top_env = cur_env.je_prev; } STMT_END
+#define JMPENV_JUMP(v) \
+ STMT_START { \
+ if (top_env->je_prev) \
+ Siglongjmp(top_env->je_buf, (v)); \
+ if ((v) == 2) \
+ exit(STATUS_NATIVE_EXPORT); \
+ PerlIO_printf(PerlIO_stderr(), "panic: top_env\n"); \
+ exit(1); \
+ } STMT_END
#define CATCH_GET (top_env->je_mustcatch)
#define CATCH_SET(v) (top_env->je_mustcatch = (v))