fixes for bugs in /RE/p from Hugo van der Sanden
authorGurusamy Sarathy <gsar@cpan.org>
Fri, 2 Oct 1998 01:42:37 +0000 (01:42 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Fri, 2 Oct 1998 01:42:37 +0000 (01:42 +0000)
Date: Mon, 28 Sep 1998 17:41:49 +0100
Message-Id: <199809281641.RAA02450@crypt.compulink.co.uk>
Subject: [PATCH 5.005_52] Re: More on ?p
--
Date: Thu, 01 Oct 1998 09:10:58 +0100
Message-Id: <199810010810.JAA16426@crypt.compulink.co.uk>
Subject: [PATCH 5.005_52] ?p fix
--
Date: Thu, 01 Oct 1998 10:45:56 +0100
Message-Id: <199810010945.KAA16733@crypt.compulink.co.uk>
Subject: [PATCH 5.005_52] more on ?p

p4raw-id: //depot/perl@1903

pp_ctl.c

index eb5e3c2..87e399a 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2380,20 +2380,20 @@ sv_compile_2op(SV *sv, OP** startop, char *code, AV** avp)
     PL_hints = 0;
 
     PL_op = &dummy;
-    PL_op->op_type = 0;                        /* Avoid uninit warning. */
+    PL_op->op_type = OP_ENTEREVAL;
     PL_op->op_flags = 0;                       /* Avoid uninit warning. */
     PUSHBLOCK(cx, CXt_EVAL, SP);
     PUSHEVAL(cx, 0, PL_compiling.cop_filegv);
     rop = doeval(G_SCALAR, startop);
-    POPBLOCK(cx,PL_curpm);
     POPEVAL(cx);
+    POPBLOCK(cx,PL_curpm);
 
     (*startop)->op_type = OP_NULL;
     (*startop)->op_ppaddr = ppaddr[OP_NULL];
     lex_end();
     *avp = (AV*)SvREFCNT_inc(PL_comppad);
     LEAVE;
-    if (curcop = &PL_compiling)
+    if (PL_curcop == &PL_compiling)
        PL_compiling.op_private = PL_hints;
 #ifdef OP_IN_REGISTER
     op = PL_opsave;