ruby-changes:32293
From: ko1 <ko1@a...>
Date: Tue, 24 Dec 2013 12:13:58 +0900 (JST)
Subject: [ruby-changes:32293] ko1:r44372 (trunk): * include/ruby/ruby.h (RARRAY_ASET): try to avoid compiler warning.
ko1 2013-12-24 12:13:52 +0900 (Tue, 24 Dec 2013) New Revision: 44372 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44372 Log: * include/ruby/ruby.h (RARRAY_ASET): try to avoid compiler warning. [Bug #9287] Modified files: trunk/ChangeLog trunk/include/ruby/ruby.h Index: include/ruby/ruby.h =================================================================== --- include/ruby/ruby.h (revision 44371) +++ include/ruby/ruby.h (revision 44372) @@ -900,8 +900,10 @@ struct RArray { https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L900 #define RARRAY_AREF(a, i) (RARRAY_CONST_PTR(a)[i]) #define RARRAY_ASET(a, i, v) do { \ - const VALUE _ary_ = (a); \ - RB_OBJ_WRITE(_ary_, &RARRAY_CONST_PTR(_ary_)[i], (v)); \ + const VALUE _ary = (a); \ + VALUE *ptr = (VALUE *)RARRAY_PTR_USE_START(_ary); \ + RB_OBJ_WRITE(_ary, &ptr[i], (v)); \ + RARRAY_PTR_USE_END(_ary); \ } while (0) #define RARRAY_PTR(a) ((VALUE *)RARRAY_CONST_PTR(RGENGC_WB_PROTECTED_ARRAY ? OBJ_WB_UNPROTECT((VALUE)a) : ((VALUE)a))) Index: ChangeLog =================================================================== --- ChangeLog (revision 44371) +++ ChangeLog (revision 44372) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Dec 24 12:11:43 2013 Koichi Sasada <ko1@a...> + + * include/ruby/ruby.h (RARRAY_ASET): try to avoid compiler warning. + [Bug #9287] + Tue Dec 24 05:04:56 2013 NAKAMURA Usaku <usa@r...> * test/fileutils/test_fileutils.rb (setup): should not call -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/