[return values correctly with G_EVAL]
authorLarry Wall <lwall@scalpel.netlabs.com>
Sat, 19 Nov 1994 01:01:34 +0000 (17:01 -0800)
committerAndy Dougherty <doughera@lafcol.lafayette.edu>
Wed, 11 Jan 1995 19:01:10 +0000 (19:01 +0000)
You need this patch for G_EVAL to return values correctly.

perl.c

diff --git a/perl.c b/perl.c
index ea90305..f2ee633 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -707,8 +707,17 @@ I32 flags;         /* See G_* flags in cop.h */
   cleanup:
     if (flags & G_EVAL) {
        if (scopestack_ix > oldscope) {
-           op = (OP*)&myop;
-           pp_leavetry();
+           SV **newsp;
+           PMOP *newpm;
+           I32 gimme;
+           register CONTEXT *cx;
+           I32 optype;
+
+           POPBLOCK(cx,newpm);
+           POPEVAL(cx);
+           pop_return();
+           curpm = newpm;
+           LEAVE;
        }
        Copy(oldtop, top_env, 1, jmp_buf);
     }