diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-19 06:34:18 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-19 06:34:18 +0000 |
commit | 77887cf01c1ddfcfc471462fb87b805b2d5c4498 (patch) | |
tree | 31a488588941ec60a4b596191c2fb4be7de0b2d8 | |
parent | b9b5a2ccab4555dd8e063870a15454d919a1d322 (diff) | |
download | ruby-77887cf01c1ddfcfc471462fb87b805b2d5c4498.tar.gz |
* array.c (rb_ary_store): use RARRAY_PTR_USE() intead of RARRAY_PTR().
Clearing memory space doesn't need WBs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | array.c | 4 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Fri Jul 19 15:32:57 2013 Koichi Sasada <ko1@atdot.net> + + * array.c (rb_ary_store): use RARRAY_PTR_USE() intead of RARRAY_PTR(). + Clearing memory space doesn't need WBs. + Fri Jul 19 15:19:37 2013 Koichi Sasada <ko1@atdot.net> * array.c (ary_ensure_room_for_push): use RARRAY_RAWPTR() instead of @@ -797,8 +797,10 @@ rb_ary_store(VALUE ary, long idx, VALUE val) ary_double_capa(ary, idx); } if (idx > RARRAY_LEN(ary)) { - rb_mem_clear(RARRAY_PTR(ary) + RARRAY_LEN(ary), + RARRAY_PTR_USE(ary, ptr, { + rb_mem_clear(ptr + RARRAY_LEN(ary), idx-RARRAY_LEN(ary) + 1); + }); } if (idx >= RARRAY_LEN(ary)) { |