зеркало из https://github.com/github/ruby.git
Assume that shared_root exists in rb_ary_decrement_share
All callers of rb_ary_decrement_share guarantee that shared_root is not 0.
This commit is contained in:
Родитель
7348db866a
Коммит
45786667ec
8
array.c
8
array.c
|
@ -512,11 +512,9 @@ ary_double_capa(VALUE ary, long min)
|
|||
static void
|
||||
rb_ary_decrement_share(VALUE shared_root)
|
||||
{
|
||||
if (shared_root) {
|
||||
long num = ARY_SHARED_ROOT_REFCNT(shared_root) - 1;
|
||||
if (num > 0) {
|
||||
ARY_SET_SHARED_ROOT_REFCNT(shared_root, num);
|
||||
}
|
||||
long num = ARY_SHARED_ROOT_REFCNT(shared_root) - 1;
|
||||
if (num > 0) {
|
||||
ARY_SET_SHARED_ROOT_REFCNT(shared_root, num);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче