1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* include/ruby/ruby.h (RARRAY_ASET): try to avoid compiler warning.

[Bug #9287]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2013-12-24 03:13:52 +00:00
parent a137f4ed3a
commit def62c3267
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Tue Dec 24 12:11:43 2013 Koichi Sasada <ko1@atdot.net>
* include/ruby/ruby.h (RARRAY_ASET): try to avoid compiler warning.
[Bug #9287]
Tue Dec 24 05:04:56 2013 NAKAMURA Usaku <usa@ruby-lang.org>
* test/fileutils/test_fileutils.rb (setup): should not call

View file

@ -900,8 +900,10 @@ struct RArray {
#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)))