[svn:parrot] r45435 - branches/immutable_strings_part1/src/string

chromatic at svn.parrot.org chromatic at svn.parrot.org
Wed Apr 7 21:16:05 UTC 2010


Author: chromatic
Date: Wed Apr  7 21:16:05 2010
New Revision: 45435
URL: https://trac.parrot.org/parrot/changeset/45435

Log:
[string] Removed some string copy operations, as their functions have
disappeared.

Modified:
   branches/immutable_strings_part1/src/string/api.c

Modified: branches/immutable_strings_part1/src/string/api.c
==============================================================================
--- branches/immutable_strings_part1/src/string/api.c	Wed Apr  7 21:16:02 2010	(r45434)
+++ branches/immutable_strings_part1/src/string/api.c	Wed Apr  7 21:16:05 2010	(r45435)
@@ -3106,17 +3106,11 @@
      */
     if (dest) {
         dest->encoding = new_encoding;
-        if (new_encoding == src->encoding) {
-            dest = Parrot_str_reuse_COW(interp, src, dest);
-            return dest;
-        }
-    }
-    else {
         if (new_encoding == src->encoding)
-            return src;
-
-        Parrot_str_write_COW(interp, src);
+            return dest;
     }
+    else if (new_encoding == src->encoding)
+        return src;
 
     return new_encoding->to_encoding(interp, src, dest);
 }


More information about the parrot-commits mailing list