aboutsummaryrefslogtreecommitdiffstats
path: root/ChangeLog
diff options
context:
space:
mode:
authorngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-01 11:24:11 +0000
committerngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-01 11:24:11 +0000
commit8dc16a79c8d56d4734f376c1b4145fe9e112f0ce (patch)
tree1da42069ea8d52a878d45f7207700c93ee7e4fea /ChangeLog
parent7aed7a49bafb41351a812161ec12eda3f846d452 (diff)
downloadruby-8dc16a79c8d56d4734f376c1b4145fe9e112f0ce.tar.gz
* string.c: Specify termlen as far as possible.
Additional fix for [Bug #12536] [ruby-dev:49699]. * string.c (rb_usascii_str_new, rb_utf8_str_new): Specify termlen which is apparently 1 for the encodings. * string.c (str_new0_cstr): New static function to create a String object from a C string with specifying termlen. * string.c (rb_usascii_str_new_cstr, rb_utf8_str_new_cstr): Specify termlen by using new str_new0_cstr(). * string.c (str_new_static): Specify termlen from the given encoding when creating a new String object is needed. * string.c (rb_tainted_str_new_with_enc): New function to create a tainted String object with the given encoding. This means that the termlen is correctly specified. Curretly static function. The function name might be renamed to rb_tainted_enc_str_new or rb_enc_tainted_str_new. * string.c (rb_external_str_new_with_enc): Use encoding by using the above rb_tainted_str_new_with_enc(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog26
1 files changed, 26 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 710ead265b..2527832b3d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,29 @@
+Fri Jul 1 20:20:20 2016 Naohisa Goto <ngotogenome@gmail.com>
+
+ * string.c: Specify termlen as far as possible.
+ Additional fix for [Bug #12536] [ruby-dev:49699].
+
+ * string.c (rb_usascii_str_new, rb_utf8_str_new): Specify termlen
+ which is apparently 1 for the encodings.
+
+ * string.c (str_new0_cstr): New static function to create a String
+ object from a C string with specifying termlen.
+
+ * string.c (rb_usascii_str_new_cstr, rb_utf8_str_new_cstr): Specify
+ termlen by using new str_new0_cstr().
+
+ * string.c (str_new_static): Specify termlen from the given encoding
+ when creating a new String object is needed.
+
+ * string.c (rb_tainted_str_new_with_enc): New function to create a
+ tainted String object with the given encoding. This means that
+ the termlen is correctly specified. Curretly static function.
+ The function name might be renamed to rb_tainted_enc_str_new
+ or rb_enc_tainted_str_new.
+
+ * string.c (rb_external_str_new_with_enc): Use encoding by using the
+ above rb_tainted_str_new_with_enc().
+
Fri Jul 1 19:38:57 2016 Naohisa Goto <ngotogenome@gmail.com>
* test/fiddle/test_pointer.rb (test_to_str, test_to_s, test_aref_aset):