* expand tabs.
This commit is contained in:
parent
796eeb6339
commit
9f26242411
10
gc.c
10
gc.c
@ -2965,14 +2965,14 @@ should_not_capture_callback(VALUE child, void *dp)
|
|||||||
{
|
{
|
||||||
struct should_not_capture_data *data = dp;
|
struct should_not_capture_data *data = dp;
|
||||||
if (child == data->obj)
|
if (child == data->obj)
|
||||||
data->found = true;
|
data->found = true;
|
||||||
|
|
||||||
if (data->found)
|
if (data->found)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Maintain a set of objects already searched, so that we don't follow a cycle
|
// Maintain a set of objects already searched, so that we don't follow a cycle
|
||||||
if (rb_hash_lookup2(data->set, child, Qfalse))
|
if (rb_hash_lookup2(data->set, child, Qfalse))
|
||||||
return;
|
return;
|
||||||
rb_hash_aset(data->set, child, Qtrue);
|
rb_hash_aset(data->set, child, Qtrue);
|
||||||
|
|
||||||
rb_objspace_reachable_objects_from(child, should_not_capture_callback, data);
|
rb_objspace_reachable_objects_from(child, should_not_capture_callback, data);
|
||||||
@ -2986,7 +2986,7 @@ should_not_capture(VALUE block, VALUE obj)
|
|||||||
rb_objspace_reachable_objects_from(block, should_not_capture_callback, &data);
|
rb_objspace_reachable_objects_from(block, should_not_capture_callback, &data);
|
||||||
rb_hash_clear(data.set);
|
rb_hash_clear(data.set);
|
||||||
if (data.found)
|
if (data.found)
|
||||||
rb_warn("object is reachable from finalizer - it may never be run");
|
rb_warn("object is reachable from finalizer - it may never be run");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -3019,7 +3019,7 @@ define_final(int argc, VALUE *argv, VALUE os)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (RTEST(ruby_verbose)) {
|
if (RTEST(ruby_verbose)) {
|
||||||
should_not_capture(block, obj);
|
should_not_capture(block, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
return define_final0(obj, block);
|
return define_final0(obj, block);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user