Re: [PATCH] Re: [PATCH] Copy on write for $& and $1...
Nicholas Clark [Mon, 17 Feb 2003 21:07:03 +0000 (21:07 +0000)]
Message-ID: <20030217210330.A8611@plum.flirble.org>

p4raw-id: //depot/perl@18738

sv.c

diff --git a/sv.c b/sv.c
index 98d70a4..73fef98 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -9323,6 +9323,9 @@ Perl_re_dup(pTHX_ REGEXP *r, CLONE_PARAMS *param)
        ret->subbeg  = SAVEPV(r->subbeg);
     else
        ret->subbeg = Nullch;
+#ifdef PERL_COPY_ON_WRITE
+    ret->saved_copy = Nullsv;
+#endif
 
     ptr_table_store(PL_ptr_table, r, ret);
     return ret;