summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorArthur Bergman <arthur@contiller.se>2001-08-12 02:34:28 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2001-08-12 17:10:22 +0000
commit26f423df377276528161ee2c2bb3d257fc527c90 (patch)
tree067e0a643999e4273dfac574d0a47b507ec91027 /perl.c
parentd8916601297526a1bb63e8e641519eb59caf53f6 (diff)
downloadperl-26f423df377276528161ee2c2bb3d257fc527c90.tar.gz
SV: END {} blocks run in perl_run
Message-ID: <03fd01c122b5$c803c600$052aa8c0@foo> p4raw-id: //depot/perl@11647
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/perl.c b/perl.c
index 17fbac4a7f..7a59772051 100644
--- a/perl.c
+++ b/perl.c
@@ -398,9 +398,16 @@ perl_destruct(pTHXx)
#endif
LEAVE;
+ {
+ dJMPENV;
+ int x = 0;
+ JMPENV_PUSH(x);
+ if (PL_endav && !PL_minus_c)
+ call_list(PL_scopestack_ix, PL_endav);
+ JMPENV_POP;
+ }
FREETMPS;
-
/* We must account for everything. */
/* Destroy the main CV and syntax tree */
@@ -1499,8 +1506,6 @@ perl_run(pTHXx)
LEAVE;
FREETMPS;
PL_curstash = PL_defstash;
- if (PL_endav && !PL_minus_c)
- call_list(oldscope, PL_endav);
#ifdef MYMALLOC
if (PerlEnv_getenv("PERL_DEBUG_MSTATS"))
dump_mstats("after execution: ");