Replace some Copy() by Move() calls, because valgrind reports
Rafael Garcia-Suarez [Wed, 19 Apr 2006 09:09:14 +0000 (09:09 +0000)]
we can have overlapping memory areas here

p4raw-id: //depot/perl@27897

doop.c

diff --git a/doop.c b/doop.c
index 202e320..c4edb60 100644 (file)
--- a/doop.c
+++ b/doop.c
@@ -215,7 +215,7 @@ S_do_trans_complex(pTHX_ SV *sv)
 
                if (comp > 0xff) {
                    if (!complement) {
-                       Copy(s, d, len, U8);
+                       Move(s, d, len, U8);
                        d += len;
                    }
                    else {
@@ -243,7 +243,7 @@ S_do_trans_complex(pTHX_ SV *sv)
                    continue;
                }
                else if (ch == -1) {    /* -1 is unmapped character */
-                   Copy(s, d, len, U8);
+                   Move(s, d, len, U8);
                    d += len;
                }
                else if (ch == -2)      /* -2 is delete character */
@@ -278,7 +278,7 @@ S_do_trans_complex(pTHX_ SV *sv)
                    matches++;
                }
                else if (ch == -1) {    /* -1 is unmapped character */
-                   Copy(s, d, len, U8);
+                   Move(s, d, len, U8);
                    d += len;
                }
                else if (ch == -2)      /* -2 is delete character */