diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-06-02 17:25:34 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-06-02 17:25:34 +0900 |
| commit | f78d2fad31a2e524da6d9975872240c695f7c124 (patch) | |
| tree | 1d67b97cfcedeba4dfc3941701d49c3fc6d38d24 /src/struct.c | |
| parent | e65d4938f373132f2ab5c75533e0bd18e188f9bc (diff) | |
| parent | 7752d2ab43088aeb5e43d1dab764cba7428cd40c (diff) | |
| download | mruby-f78d2fad31a2e524da6d9975872240c695f7c124.tar.gz mruby-f78d2fad31a2e524da6d9975872240c695f7c124.zip | |
Merge branch 'master' of github.com:mruby/mruby
Diffstat (limited to 'src/struct.c')
| -rw-r--r-- | src/struct.c | 2 |
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) { |
