[macruby-changes] [4127] MacRuby/trunk/string.c
source_changes at macosforge.org
source_changes at macosforge.org
Thu May 20 05:07:13 PDT 2010
Revision: 4127
http://trac.macosforge.org/projects/ruby/changeset/4127
Author: vincent.isambart at gmail.com
Date: 2010-05-20 05:07:10 -0700 (Thu, 20 May 2010)
Log Message:
-----------
forgot to set a flag on strings transcoded to native UTF-16
Modified Paths:
--------------
MacRuby/trunk/string.c
Modified: MacRuby/trunk/string.c
===================================================================
--- MacRuby/trunk/string.c 2010-05-19 23:19:02 UTC (rev 4126)
+++ MacRuby/trunk/string.c 2010-05-20 12:07:10 UTC (rev 4127)
@@ -382,6 +382,11 @@
if (str_is_stored_in_uchars(self)) {
return true;
}
+ else if (NATIVE_UTF16_ENC(self->encoding)) {
+ // sometimes the flag might not already be set so set it
+ str_set_stored_in_uchars(self, true);
+ return true;
+ }
else if (NON_NATIVE_UTF16_ENC(self->encoding)) {
str_invert_byte_order(self);
return true;
@@ -1488,7 +1493,11 @@
str_concat_ascii_cstr(dst_str, "\"");
}
+ if (NATIVE_UTF16_ENC(dst_str->encoding)) {
+ str_set_stored_in_uchars(dst_str, true);
+ }
+
return dst_str;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100520/82d17a78/attachment.html>
More information about the macruby-changes
mailing list