1
0
Fork 0
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:
nobu 2012-10-06 00:50:12 +00:00
parent 122de73a19
commit b1058ef46c

3
gc.c
View file

@ -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 {