ruby-changes:30054
From: ko1 <ko1@a...>
Date: Mon, 22 Jul 2013 13:21:11 +0900 (JST)
Subject: [ruby-changes:30054] ko1:r42106 (trunk): * array.c (ary_resize_capa): use RARRAY_RAWPTR() because
ko1 2013-07-22 13:21:01 +0900 (Mon, 22 Jul 2013) New Revision: 42106 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42106 Log: * array.c (ary_resize_capa): use RARRAY_RAWPTR() because this code creates no new references. Modified files: trunk/ChangeLog trunk/array.c Index: array.c =================================================================== --- array.c (revision 42105) +++ array.c (revision 42106) @@ -263,12 +263,12 @@ ary_resize_capa(VALUE ary, long capacity https://github.com/ruby/ruby/blob/trunk/array.c#L263 else { if (!ARY_EMBED_P(ary)) { long len = RARRAY_LEN(ary); - VALUE *ptr = RARRAY_PTR(ary); + const VALUE *ptr = RARRAY_RAWPTR(ary); if (len > capacity) len = capacity; MEMCPY((VALUE *)RARRAY(ary)->as.ary, ptr, VALUE, len); FL_SET_EMBED(ary); ARY_SET_LEN(ary, len); - xfree(ptr); + xfree((VALUE *)ptr); } } } Index: ChangeLog =================================================================== --- ChangeLog (revision 42105) +++ ChangeLog (revision 42106) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Jul 22 13:19:22 2013 Koichi Sasada <ko1@a...> + + * array.c (ary_resize_capa): use RARRAY_RAWPTR() because + this code creates no new references. + Mon Jul 22 12:58:18 2013 Koichi Sasada <ko1@a...> * array.c (ary_memfill): added. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/