summaryrefslogtreecommitdiffhomepage
path: root/src/struct.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2012-06-02 00:24:18 -0700
committerYukihiro "Matz" Matsumoto <[email protected]>2012-06-02 00:24:18 -0700
commitdafb6ead6553eae4321586068ee7e3dd842e59f1 (patch)
tree2d8d9131c8f89328b0806946004f8cc29e60facd /src/struct.c
parente786fd9f966e9ce967fc5aaf2cc5c4e8d39a56f8 (diff)
parent49df2179578c34caefbe693a0eb74facb3ff9679 (diff)
downloadmruby-dafb6ead6553eae4321586068ee7e3dd842e59f1.tar.gz
mruby-dafb6ead6553eae4321586068ee7e3dd842e59f1.zip
Merge pull request #217 from takahashim/fix-use-mrb_malloc
use mrb_malloc instead of malloc
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 d06124b50..fbe018930 100644
--- a/src/struct.c
+++ b/src/struct.c
@@ -416,7 +416,7 @@ mrb_struct_initialize_withArg(mrb_state *mrb, int argc, mrb_value *argv, mrb_val
mrb_raise(mrb, E_ARGUMENT_ERROR, "struct size differs");
}
st = RSTRUCT(self);
- st->ptr = malloc(sizeof(mrb_value)*argc);
+ st->ptr = mrb_malloc(mrb, sizeof(mrb_value)*argc);
st->len = n;
memcpy(st->ptr, argv, sizeof(mrb_value)*argc);
//if (n > argc) {