mirror of
https://github.com/ruby/ruby.git
synced 2025-09-20 11:03:58 +02:00
* 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
This commit is contained in:
parent
53bd4502d8
commit
c813697d97
2 changed files with 6 additions and 1 deletions
|
@ -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>
|
Thu Mar 20 12:59:39 2014 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* include/ruby/intern.h (rb_obj_call_init, rb_class_new_instance):
|
* include/ruby/intern.h (rb_obj_call_init, rb_class_new_instance):
|
||||||
|
|
2
struct.c
2
struct.c
|
@ -480,7 +480,7 @@ struct_alloc(VALUE klass)
|
||||||
VALUE
|
VALUE
|
||||||
rb_struct_alloc(VALUE klass, VALUE values)
|
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
|
VALUE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue