ruby-changes:33289
From: ko1 <ko1@a...>
Date: Thu, 20 Mar 2014 13:03:20 +0900 (JST)
Subject: [ruby-changes:33289] ko1:r45368 (trunk): * include/ruby/intern.h (rb_obj_call_init, rb_class_new_instance):
ko1 2014-03-20 13:03:11 +0900 (Thu, 20 Mar 2014) New Revision: 45368 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45368 Log: * include/ruby/intern.h (rb_obj_call_init, rb_class_new_instance): constify a parameter (VALUE *). I believe this incompatibility doesn't break any code. However, if you have trouble, please tell us. * eval.c, object.c: ditto. Modified files: trunk/ChangeLog trunk/eval.c trunk/include/ruby/intern.h trunk/object.c Index: include/ruby/intern.h =================================================================== --- include/ruby/intern.h (revision 45367) +++ include/ruby/intern.h (revision 45368) @@ -398,8 +398,8 @@ int rb_feature_provided(const char *, co https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L398 void rb_provide(const char*); VALUE rb_f_require(VALUE, VALUE); VALUE rb_require_safe(VALUE, int); -void rb_obj_call_init(VALUE, int, VALUE*); -VALUE rb_class_new_instance(int, VALUE*, VALUE); +void rb_obj_call_init(VALUE, int, const VALUE*); +VALUE rb_class_new_instance(int, const VALUE*, VALUE); VALUE rb_block_proc(void); VALUE rb_block_lambda(void); VALUE rb_proc_new(VALUE (*)(ANYARGS/* VALUE yieldarg[, VALUE procarg] */), VALUE); Index: ChangeLog =================================================================== --- ChangeLog (revision 45367) +++ ChangeLog (revision 45368) @@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Mar 20 12:59:39 2014 Koichi Sasada <ko1@a...> + + * include/ruby/intern.h (rb_obj_call_init, rb_class_new_instance): + constify a parameter (VALUE *). + I believe this incompatibility doesn't break any code. + However, if you have trouble, please tell us. + + * eval.c, object.c: ditto. + Thu Mar 20 12:31:26 2014 Nobuyoshi Nakada <nobu@r...> * vm_method.c (rb_method_entry_get_without_cache): get rid of Index: object.c =================================================================== --- object.c (revision 45367) +++ object.c (revision 45368) @@ -1840,7 +1840,7 @@ rb_class_allocate_instance(VALUE klass) https://github.com/ruby/ruby/blob/trunk/object.c#L1840 */ VALUE -rb_class_new_instance(int argc, VALUE *argv, VALUE klass) +rb_class_new_instance(int argc, const VALUE *argv, VALUE klass) { VALUE obj; Index: eval.c =================================================================== --- eval.c (revision 45367) +++ eval.c (revision 45368) @@ -1330,7 +1330,7 @@ mod_using(VALUE self, VALUE module) https://github.com/ruby/ruby/blob/trunk/eval.c#L1330 } void -rb_obj_call_init(VALUE obj, int argc, VALUE *argv) +rb_obj_call_init(VALUE obj, int argc, const VALUE *argv) { PASS_PASSED_BLOCK(); rb_funcall2(obj, idInitialize, argc, argv); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/