diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-15 10:32:58 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-15 10:32:58 +0000 |
commit | b5e89e44f12a6e3a42e9515d1d3705d11f9442bf (patch) | |
tree | e1fb1a0cd6b9fe28df591c9cbed4e9a4c7fdd4d3 /node.h | |
parent | 85691b9578fae7de871fba8084e4c35205b441e9 (diff) | |
download | ruby-b5e89e44f12a6e3a42e9515d1d3705d11f9442bf.tar.gz |
* array.c (rb_ary_tmp_new): added.
This function creates internal use only array (which is completely
hided by ObjectSpace.each_object) with filling nil.
Otherwise, it can be incldues strange VALUEs.
* internal.h: added.
* node.h: use rb_ary_tmp_new_fill() for MEMO.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'node.h')
-rw-r--r-- | node.h | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -468,9 +468,7 @@ typedef struct RNode { #define roomof(x, y) ((sizeof(x) + sizeof(y) - 1) / sizeof(y)) #define MEMO_FOR(type, value) ((type *)RARRAY_PTR(value)) #define NEW_MEMO_FOR(type, value) \ - (rb_ary_set_len(((value) = rb_ary_tmp_new(roomof(type, VALUE))), \ - roomof(type, VALUE)), \ - MEMO_FOR(type, value)) + ((value) = rb_ary_tmp_new_fill(roomof(type, VALUE)), MEMO_FOR(type, value)) RUBY_SYMBOL_EXPORT_BEGIN |