Re: Perl_sighandler voodoo (was Re: Smoke [5.8.7] 26127 FAIL(XF) MSWin32 WinXP/.Net...
Robin Houston [Sun, 27 Nov 2005 00:43:13 +0000 (00:43 +0000)]
Message-ID: <20051127004313.GA7007@rpc142.cs.man.ac.uk>

Simplification of the code in my_exit_jump() that unwinds context
stacks

p4raw-id: //depot/perl@27207

perl.c

diff --git a/perl.c b/perl.c
index 7b715ae..554e312 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -5247,9 +5247,6 @@ STATIC void
 S_my_exit_jump(pTHX)
 {
     dVAR;
-    register PERL_CONTEXT *cx;
-    I32 gimme;
-    SV **newsp;
 
     if (PL_e_script) {
        SvREFCNT_dec(PL_e_script);
@@ -5257,16 +5254,10 @@ S_my_exit_jump(pTHX)
     }
 
     POPSTACK_TO(PL_mainstack);
-    if (cxstack_ix >= 0) {
-       if (cxstack_ix > 0)
-           dounwind(0);
-       POPBLOCK(cx,PL_curpm);
-       LEAVE;
-    }
+    dounwind(-1);
+    LEAVE_SCOPE(0);
 
     JMPENV_JUMP(2);
-    PERL_UNUSED_VAR(gimme);
-    PERL_UNUSED_VAR(newsp);
 }
 
 static I32