[svn:parrot] r45523 - branches/immutable_strings_part1/src/string/encoding

bacek at svn.parrot.org bacek at svn.parrot.org
Sat Apr 10 14:36:46 UTC 2010


Author: bacek
Date: Sat Apr 10 14:36:46 2010
New Revision: 45523
URL: https://trac.parrot.org/parrot/changeset/45523

Log:
Update ucs2.get_codepoints.

Modified:
   branches/immutable_strings_part1/src/string/encoding/ucs2.c

Modified: branches/immutable_strings_part1/src/string/encoding/ucs2.c
==============================================================================
--- branches/immutable_strings_part1/src/string/encoding/ucs2.c	Sat Apr 10 14:36:34 2010	(r45522)
+++ branches/immutable_strings_part1/src/string/encoding/ucs2.c	Sat Apr 10 14:36:46 2010	(r45523)
@@ -361,7 +361,9 @@
 get_codepoints(PARROT_INTERP, ARGIN(STRING *src), UINTVAL offset, UINTVAL count)
 {
     ASSERT_ARGS(get_codepoints)
-    STRING * const return_string = Parrot_str_new_COW(interp, src);
+    STRING * const return_string = Parrot_gc_new_string_header(interp, 0);
+    STRUCT_COPY(return_string, src);
+
 #if PARROT_HAS_ICU
     return_string->strstart = (char*)src->strstart + offset * sizeof (UChar);
     return_string->bufused = count * sizeof (UChar);


More information about the parrot-commits mailing list