mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* include/ruby/ruby.h: add new utility macros to access
Array's element. * RARRAY_AREF(a, i) returns i-th element of an array `a' * RARRAY_ASET(a, i, v) set i-th element of `a' to `v' This change is a part of RGENGC branch [ruby-trunk - Feature #8339]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c8fc37a99c
commit
12bf73637b
2 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
|||
Mon May 13 16:53:53 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* include/ruby/ruby.h: add new utility macros to access
|
||||
Array's element.
|
||||
* RARRAY_AREF(a, i) returns i-th element of an array `a'
|
||||
* RARRAY_ASET(a, i, v) set i-th element of `a' to `v'
|
||||
This change is a part of RGENGC branch [ruby-trunk - Feature #8339].
|
||||
|
||||
Mon May 13 15:31:10 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* object.c (rb_obj_setup): added.
|
||||
|
|
|
@ -892,6 +892,9 @@ struct RArray {
|
|||
RARRAY(a)->as.heap.ptr)
|
||||
#define RARRAY_LENINT(ary) rb_long2int(RARRAY_LEN(ary))
|
||||
|
||||
#define RARRAY_AREF(a, i) (RARRAY_PTR(a)[i])
|
||||
#define RARRAY_ASET(a, i, v) do {RARRAY_PTR(a)[i] = (v);} while (0)
|
||||
|
||||
struct RRegexp {
|
||||
struct RBasic basic;
|
||||
struct re_pattern_buffer *ptr;
|
||||
|
|
Loading…
Reference in a new issue