Change hash_replace_ref_value to assume value moved
When hash_foreach_replace_value returns ST_REPLACE, it's guaranteed that the value has moved in hash_replace_ref_value.
This commit is contained in:
parent
3f30c4df8c
commit
b0c92d6c3f
Notes:
git
2024-08-22 17:50:35 +00:00
4
gc/gc.h
4
gc/gc.h
@ -73,9 +73,7 @@ hash_replace_ref_value(st_data_t *key, st_data_t *value, st_data_t argp, int exi
|
||||
{
|
||||
void *objspace = (void *)argp;
|
||||
|
||||
if (rb_gc_impl_object_moved_p(objspace, (VALUE)*value)) {
|
||||
*value = rb_gc_impl_location(objspace, (VALUE)*value);
|
||||
}
|
||||
*value = rb_gc_impl_location(objspace, (VALUE)*value);
|
||||
|
||||
return ST_CONTINUE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user