This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fixup to "avoid identical stack traces"
[perl5.git] / op.c
diff --git a/op.c b/op.c
index a3ad215..7cf4e84 100644 (file)
--- a/op.c
+++ b/op.c
@@ -11598,10 +11598,8 @@ S_process_special_blocks(pTHX_ I32 floor, const char *const fullname,
                  * to PL_compiling, IN_PERL_COMPILETIME/IN_PERL_RUNTIME
                  * will give the wrong answer.
                  */
-                Newx(PL_curcop, 1, COP);
-                StructCopy(&PL_compiling, PL_curcop, COP);
-                PL_curcop->op_slabbed = 0;
-                SAVEFREEPV(PL_curcop);
+                PL_curcop = (COP*)newSTATEOP(PL_compiling.op_flags, NULL, NULL);
+                CopLINE_set(PL_curcop, CopLINE(&PL_compiling));
             }
 
             PUSHSTACKi(PERLSI_REQUIRE);