ruby-changes:55473
From: svn <ko1@a...>
Date: Tue, 23 Apr 2019 10:40:56 +0900 (JST)
Subject: [ruby-changes:55473] svn:50783b870e (ruby_1_8): * 2014-01-28
svn 2014-01-28 03:58:00 +0900 (Tue, 28 Jan 2014) New Revision: 50783b870e https://git.ruby-lang.org/ruby.git/commit/?id=50783b870e Log: * 2014-01-28 git-svn-id: svn+ssh://svn.ruby-lang.org/ruby/branches/ruby_1_8@44718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Modified files: version.h Index: class.c =================================================================== --- class.c (revision 50782) +++ class.c (revision 50783) @@ -1065,11 +1065,11 @@ rb_mod_ancestors(VALUE mod) https://github.com/ruby/ruby/blob/trunk/class.c#L1065 } static int -ins_methods_push(ID name, long type, VALUE ary, long visi) +ins_methods_push(ID name, long type, VALUE ary, rb_method_visibility_t visi) { if (type == METHOD_VISI_UNDEF) return ST_CONTINUE; - switch ((rb_method_visibility_t)visi) { + switch (visi) { case METHOD_VISI_UNDEF: return ST_CONTINUE; case METHOD_VISI_PRIVATE: @@ -1090,7 +1090,7 @@ ins_methods_push(ID name, long type, VAL https://github.com/ruby/ruby/blob/trunk/class.c#L1090 static int ins_methods_i(st_data_t name, st_data_t type, st_data_t ary) { - return ins_methods_push((ID)name, (long)type, (VALUE)ary, -1); /* everything but private */ + return ins_methods_push((ID)name, (rb_method_visibility_t)type, (VALUE)ary, -1); /* everything but private */ } static int @@ -1136,7 +1136,7 @@ method_entry_i(st_data_t key, st_data_t https://github.com/ruby/ruby/blob/trunk/class.c#L1136 else { type = me->def->flags.visi; } - st_add_direct(arg->list, key, (long)type); + st_add_direct(arg->list, key, (st_data_t)type); } return ST_CONTINUE; } Index: ChangeLog =================================================================== --- ChangeLog (revision 50782) +++ ChangeLog (revision 50783) @@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Jun 5 22:37:42 2015 Koichi Sasada <ko1@a...> + + * class.c (ins_methods_push): change 3rd parameter's type + from long to rb_method_visibility_t. + + * class.c (ins_methods_i): catch up this fix. + + * class.c (method_entry_i): cast to st_data_t instead of `long'. + Fri Jun 5 20:37:10 2015 Koichi Sasada <ko1@a...> * internal.h: move definition of rb_cref_t to method.h. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/