[svn:parrot] r47088 - trunk/src/pmc
jimmy at svn.parrot.org
jimmy at svn.parrot.org
Fri May 28 13:46:02 UTC 2010
Author: jimmy
Date: Fri May 28 13:46:02 2010
New Revision: 47088
URL: https://trac.parrot.org/parrot/changeset/47088
Log:
[pmc/stringbuilder]remove unused codes
Modified:
trunk/src/pmc/stringbuilder.pmc
Modified: trunk/src/pmc/stringbuilder.pmc
==============================================================================
--- trunk/src/pmc/stringbuilder.pmc Fri May 28 13:17:32 2010 (r47087)
+++ trunk/src/pmc/stringbuilder.pmc Fri May 28 13:46:02 2010 (r47088)
@@ -145,20 +145,9 @@
/* TODO Ask chromatic why in Parrot_str_join he ignored charset */
cs = Parrot_str_rep_compatible(interp, buffer, s, &enc);
if (!cs) {
- STRING *new_buffer;
-
- cs = Parrot_unicode_charset_ptr;
- enc = (buffer->encoding == Parrot_utf16_encoding_ptr
- || s->encoding == Parrot_utf16_encoding_ptr
- || buffer->encoding == Parrot_ucs2_encoding_ptr
- || s->encoding == Parrot_ucs2_encoding_ptr)
- ? Parrot_utf16_encoding_ptr
- : Parrot_utf8_encoding_ptr;
-
- s = Parrot_unicode_charset_ptr->to_charset(interp, s);
/* Create new temporary string */
- new_buffer = Parrot_unicode_charset_ptr->to_charset(interp, buffer);
+ STRING * const new_buffer = Parrot_unicode_charset_ptr->to_charset(interp, buffer);
mem_gc_free(INTERP, buffer->_bufstart);
STRUCT_COPY(buffer, new_buffer);
buffer->flags = PObj_is_string_FLAG | PObj_live_FLAG | PObj_external_FLAG;
@@ -168,6 +157,8 @@
mem_sys_memcopy(buffer->_bufstart, new_buffer->_bufstart, new_buffer->_buflen);
SET_ATTR_buffer(INTERP, SELF, buffer);
+
+ s = Parrot_unicode_charset_ptr->to_charset(interp, s);
}
/* Calculate (possibly new) total size */
More information about the parrot-commits
mailing list