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

bacek at svn.parrot.org bacek at svn.parrot.org
Thu Apr 15 10:06:36 UTC 2010


Author: bacek
Date: Thu Apr 15 10:06:36 2010
New Revision: 45680
URL: https://trac.parrot.org/parrot/changeset/45680

Log:
Don't "copy" old string in Parrot_str_clone. Just create new fresh string header.

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	Thu Apr 15 10:06:24 2010	(r45679)
+++ branches/immutable_strings_part1/src/string/api.c	Thu Apr 15 10:06:36 2010	(r45680)
@@ -326,7 +326,7 @@
 {
     ASSERT_ARGS(Parrot_str_clone)
 
-    STRING *result     = Parrot_str_copy(interp, s);
+    STRING *result     = Parrot_gc_new_string_header(interp, 0);
     size_t  alloc_size = s->bufused;
 
     /* Clear COW flag. We own buffer */


More information about the parrot-commits mailing list