Skip to content

Commit

Permalink
* class.c, gc.c vm.c: use ID_TABLE_* instead of ST_*
Browse files Browse the repository at this point in the history
  (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
  • Loading branch information
ko1 committed Aug 12, 2015
1 parent 8ac3bf1 commit 408fa5e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
14 changes: 7 additions & 7 deletions class.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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)) {
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 408fa5e

Please sign in to comment.