mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
gc.c: use markable_object_p
* gc.c (gc_mark_children): use markable_object_p() and reduce duplicated code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
122de73a19
commit
b1058ef46c
1 changed files with 1 additions and 2 deletions
3
gc.c
3
gc.c
|
@ -2583,8 +2583,7 @@ gc_mark_children(rb_objspace_t *objspace, VALUE ptr)
|
|||
again:
|
||||
if (LIKELY(objspace->mark_func_data == 0)) {
|
||||
obj = RANY(ptr);
|
||||
if (rb_special_const_p(ptr)) return; /* special const not marked */
|
||||
if (obj->as.basic.flags == 0) return; /* free cell */
|
||||
if (!markable_object_p(objspace, ptr)) return;
|
||||
if (!gc_mark_ptr(objspace, ptr)) return; /* already marked */
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Reference in a new issue