зеркало из https://github.com/github/ruby.git
* array.c (rb_ary_shift_m): use RARRAY_PTR_USE() without WB because
there are not new relations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
27f2c267fd
Коммит
564a14e497
|
@ -1,3 +1,8 @@
|
|||
Wed Nov 6 21:16:51 2013 Masaki Matsushita <glass.saga@gmail.com>
|
||||
|
||||
* array.c (rb_ary_shift_m): use RARRAY_PTR_USE() without WB because
|
||||
there are not new relations.
|
||||
|
||||
Wed Nov 6 21:05:20 2013 Masaki Matsushita <glass.saga@gmail.com>
|
||||
|
||||
* array.c (rb_ary_reverse): use RARRAY_PTR_USE().
|
||||
|
|
4
array.c
4
array.c
|
@ -1070,7 +1070,9 @@ rb_ary_shift_m(int argc, VALUE *argv, VALUE ary)
|
|||
ARY_INCREASE_PTR(ary, n);
|
||||
}
|
||||
else {
|
||||
MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary)+n, VALUE, RARRAY_LEN(ary)-n);
|
||||
RARRAY_PTR_USE(ary, ptr, {
|
||||
MEMMOVE(ptr, ptr + n, VALUE, RARRAY_LEN(ary)-n);
|
||||
}); /* WB: no new reference */
|
||||
}
|
||||
ARY_INCREASE_LEN(ary, -n);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче