aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-20 04:06:27 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-20 04:06:27 +0000
commitc813697d97832ffe4d660ab9bf0e5c3519448071 (patch)
tree79bc855a1816996f08e5068e03d7586793a45d01
parent53bd4502d830d5aafae5deb9278a3ec10c9fb093 (diff)
downloadruby-c813697d97832ffe4d660ab9bf0e5c3519448071.tar.gz
* struct.c (rb_struct_alloc): use RARRAY_CONST_PTR() instead of
RARRAY_PTR(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--struct.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 71db7648f4..e81d557d37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Mar 20 13:05:16 2014 Koichi Sasada <ko1@atdot.net>
+
+ * struct.c (rb_struct_alloc): use RARRAY_CONST_PTR() instead of
+ RARRAY_PTR().
+
Thu Mar 20 12:59:39 2014 Koichi Sasada <ko1@atdot.net>
* include/ruby/intern.h (rb_obj_call_init, rb_class_new_instance):
diff --git a/struct.c b/struct.c
index c3dba62962..7da60dbad0 100644
--- a/struct.c
+++ b/struct.c
@@ -480,7 +480,7 @@ struct_alloc(VALUE klass)
VALUE
rb_struct_alloc(VALUE klass, VALUE values)
{
- return rb_class_new_instance(RARRAY_LENINT(values), RARRAY_PTR(values), klass);
+ return rb_class_new_instance(RARRAY_LENINT(values), RARRAY_CONST_PTR(values), klass);
}
VALUE