mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* class.c, gc.c vm.c: use ID_TABLE_* instead of ST_*
(such as ST_CONTINUE) for enum rb_id_table_iterator_result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8ac3bf1894
commit
408fa5e687
4 changed files with 14 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Aug 12 17:57:53 2015 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* class.c, gc.c vm.c: use ID_TABLE_* instead of ST_*
|
||||
(such as ST_CONTINUE) for enum rb_id_table_iterator_result.
|
||||
|
||||
Wed Aug 12 17:05:36 2015 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* id_table.h: introduce ID key table.
|
||||
|
|
14
class.c
14
class.c
|
@ -269,7 +269,7 @@ clone_method_i(ID key, VALUE value, void *data)
|
|||
{
|
||||
const struct clone_method_arg *arg = (struct clone_method_arg *)data;
|
||||
clone_method(arg->old_klass, arg->new_klass, key, (const rb_method_entry_t *)value);
|
||||
return ST_CONTINUE;
|
||||
return ID_TABLE_CONTINUE;
|
||||
}
|
||||
|
||||
struct clone_const_arg {
|
||||
|
@ -846,7 +846,7 @@ static enum rb_id_table_iterator_result
|
|||
add_refined_method_entry_i(ID key, VALUE value, void *data)
|
||||
{
|
||||
rb_add_refined_method_entry((VALUE)data, key);
|
||||
return ST_CONTINUE;
|
||||
return ID_TABLE_CONTINUE;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -924,11 +924,11 @@ move_refined_method(ID key, VALUE value, void *data)
|
|||
}
|
||||
else {
|
||||
rb_id_table_insert(tbl, key, (VALUE)me);
|
||||
return ST_DELETE;
|
||||
return ID_TABLE_DELETE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return ST_CONTINUE;
|
||||
return ID_TABLE_CONTINUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1121,8 +1121,8 @@ method_entry_i(ID key, VALUE value, void *data)
|
|||
if (me->def->type == VM_METHOD_TYPE_REFINED) {
|
||||
VALUE owner = me->owner;
|
||||
me = rb_resolve_refined_method(Qnil, me);
|
||||
if (!me) return ST_CONTINUE;
|
||||
if (!arg->recur && me->owner != owner) return ST_CONTINUE;
|
||||
if (!me) return ID_TABLE_CONTINUE;
|
||||
if (!arg->recur && me->owner != owner) return ID_TABLE_CONTINUE;
|
||||
}
|
||||
if (!st_lookup(arg->list, key, 0)) {
|
||||
if (UNDEFINED_METHOD_ENTRY_P(me)) {
|
||||
|
@ -1133,7 +1133,7 @@ method_entry_i(ID key, VALUE value, void *data)
|
|||
}
|
||||
st_add_direct(arg->list, key, (st_data_t)type);
|
||||
}
|
||||
return ST_CONTINUE;
|
||||
return ID_TABLE_CONTINUE;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
|
|
2
gc.c
2
gc.c
|
@ -3967,7 +3967,7 @@ mark_method_entry_i(VALUE me, void *data)
|
|||
rb_objspace_t *objspace = (rb_objspace_t *)data;
|
||||
|
||||
gc_mark(objspace, me);
|
||||
return ST_CONTINUE;
|
||||
return ID_TABLE_CONTINUE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
2
vm.c
2
vm.c
|
@ -1251,7 +1251,7 @@ check_redefined_method(ID mid, VALUE value, void *data)
|
|||
|
||||
if (newme != me) rb_vm_check_redefinition_opt_method(me, me->owner);
|
||||
|
||||
return ST_CONTINUE;
|
||||
return ID_TABLE_CONTINUE;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue