summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-10-14 02:21:31 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-10-14 02:21:31 +0000
commitdb36c5a16ec06ab929abf72b6174b106e97b8088 (patch)
tree80241b0e63078300a14a8752ae093dae0c8b04c9 /scope.c
parent501fbaef3175dd8502946b025f50c421a76a0318 (diff)
downloadperl-db36c5a16ec06ab929abf72b6174b106e97b8088.tar.gz
avoid inefficiency in change#3386 (every longjmp() was followed
by an avoidable call to setjmp()) p4raw-link: @3386 on //depot/perl: 312caa8e97f1c7ee342a9895c2f0e749625b4929 p4raw-id: //depot/perl@4372
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/scope.c b/scope.c
index 9ee0429e02..1597acc9dc 100644
--- a/scope.c
+++ b/scope.c
@@ -17,26 +17,27 @@
#include "perl.h"
void *
-Perl_default_protect(pTHX_ int *excpt, protect_body_t body, ...)
+Perl_default_protect(pTHX_ volatile JMPENV *pcur_env, int *excpt,
+ protect_body_t body, ...)
{
void *ret;
va_list args;
va_start(args, body);
- ret = vdefault_protect(excpt, body, &args);
+ ret = vdefault_protect(pcur_env, excpt, body, &args);
va_end(args);
return ret;
}
void *
-Perl_vdefault_protect(pTHX_ int *excpt, protect_body_t body, va_list *args)
+Perl_vdefault_protect(pTHX_ volatile JMPENV *pcur_env, int *excpt,
+ protect_body_t body, va_list *args)
{
dTHR;
- dJMPENV;
int ex;
void *ret;
DEBUG_l(Perl_deb(aTHX_ "Setting up local jumplevel %p, was %p\n",
- &cur_env, PL_top_env));
+ pcur_env, PL_top_env));
JMPENV_PUSH(ex);
if (ex)
ret = NULL;