summaryrefslogtreecommitdiffhomepage
path: root/src/struct.c
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-06-03 23:05:31 +0900
committerYukihiro Matsumoto <[email protected]>2012-06-03 23:05:31 +0900
commite4529c065dfcd844dbea11ba3822af7528393450 (patch)
tree3d35638eff080e831556bec17d02d2660be19e0e /src/struct.c
parent3be1c8890774c04d65bbed87914e9453d1496eed (diff)
downloadmruby-e4529c065dfcd844dbea11ba3822af7528393450.tar.gz
mruby-e4529c065dfcd844dbea11ba3822af7528393450.zip
make arrays to share bodies
Diffstat (limited to 'src/struct.c')
-rw-r--r--src/struct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/struct.c b/src/struct.c
index e9266ad17..2e2e0c10f 100644
--- a/src/struct.c
+++ b/src/struct.c
@@ -450,7 +450,7 @@ mrb_struct_new(mrb_state *mrb, struct RClass *klass, ...)
size = mrb_long2int(num_members(mrb, klass));
if (size > numberof(tmpargs)) {
- tmpargs[0] = mrb_ary_tmp_new(mrb, size);
+ tmpargs[0] = mrb_ary_new_capa(mrb, size);
mem = RARRAY_PTR(tmpargs[0]);
}
va_start(args, klass);