summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorChip Salzenberg <chip@perl.com>1997-03-31 18:38:42 +1200
committerChip Salzenberg <chip@atlantic.net>1997-04-01 12:01:35 +1200
commit22921e25517d6c195d0fab9eb946bfafb563c256 (patch)
treee7ef4ba682dc5663a43c21c9ade1232c27eff250 /perl.c
parentac1d45ba28d946eab50fa4af2a48e56aa1122da1 (diff)
downloadperl-22921e25517d6c195d0fab9eb946bfafb563c256.tar.gz
Don't use setjmp() and longjmp() in complex exprs
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/perl.c b/perl.c
index 8cbdd8771a..9f06f13634 100644
--- a/perl.c
+++ b/perl.c
@@ -457,6 +457,7 @@ char **env;
I32 oldscope;
AV* comppadlist;
dJMPENV;
+ int ret;
#ifdef SETUID_SCRIPTS_ARE_SECURE_NOW
#ifdef IAMSUID
@@ -505,7 +506,8 @@ setuid perl scripts securely.\n");
time(&basetime);
oldscope = scopestack_ix;
- switch (JMPENV_PUSH) {
+ JMPENV_PUSH(ret);
+ switch (ret) {
case 1:
STATUS_ALL_FAILURE;
/* FALL THROUGH */
@@ -821,15 +823,17 @@ int
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;
@@ -1005,6 +1009,7 @@ I32 flags; /* See G_* flags in cop.h */
static CV *DBcv;
bool oldcatch = CATCH_GET;
dJMPENV;
+ int ret;
if (flags & G_DISCARD) {
ENTER;
@@ -1058,7 +1063,8 @@ I32 flags; /* See G_* flags in cop.h */
}
markstack_ptr++;
- switch (JMPENV_PUSH) {
+ JMPENV_PUSH(ret);
+ switch (ret) {
case 0:
break;
case 1:
@@ -1142,6 +1148,7 @@ I32 flags; /* See G_* flags in cop.h */
I32 retval;
I32 oldscope;
dJMPENV;
+ int ret;
if (flags & G_DISCARD) {
ENTER;
@@ -1165,7 +1172,8 @@ I32 flags; /* See G_* flags in cop.h */
if (flags & G_KEEPERR)
myop.op_flags |= OPf_SPECIAL;
- switch (JMPENV_PUSH) {
+ JMPENV_PUSH(ret);
+ switch (ret) {
case 0:
break;
case 1:
@@ -2467,16 +2475,18 @@ call_list(oldscope, list)
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);