aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-05 13:39:59 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-05 13:39:59 +0000
commit754773e93c4ddde89cca738dde002ec154511463 (patch)
treedfe75eb839013aad4032f4d745dfa6117ece8221
parentae6d1928814b0c5e794ca4fb7e711a72a06f7080 (diff)
downloadruby-754773e93c4ddde89cca738dde002ec154511463.tar.gz
* 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'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog9
-rw-r--r--class.c8
2 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 1af08d9225..71f4fe38b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Fri Jun 5 22:37:42 2015 Koichi Sasada <ko1@atdot.net>
+
+ * 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@atdot.net>
* internal.h: move definition of rb_cref_t to method.h.
diff --git a/class.c b/class.c
index 1f35be413b..973aa5520e 100644
--- a/class.c
+++ b/class.c
@@ -1065,11 +1065,11 @@ rb_mod_ancestors(VALUE mod)
}
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, VALUE ary, long visi)
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 value, st_data_t data)
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;
}