X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=scope.h;h=debe1f88a7fc903f22342cdf78070011a83897ec;hb=74a7701791a30556a92328b89e5a00414a4ce4a3;hp=d6eb270a909b65e25256c4b45352e178ee9f712b;hpb=54310121b442974721115f93666234a200f5c7e4;p=p5sagit%2Fp5-mst-13.2.git diff --git a/scope.h b/scope.h index d6eb270..debe1f8 100644 --- a/scope.h +++ b/scope.h @@ -96,16 +96,25 @@ struct jmpenv { 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))