diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-05-29 09:56:48 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-05-29 09:56:48 +0900 |
| commit | 2d887c57ff809b20f1e094b584a58aa9eb071ac8 (patch) | |
| tree | 75483add90164d38f66d9db9ae39fc2b2428585c /src | |
| parent | 0dd5e0eba6806c8d16c1b38ba4e878455698d7e2 (diff) | |
| download | mruby-2d887c57ff809b20f1e094b584a58aa9eb071ac8.tar.gz mruby-2d887c57ff809b20f1e094b584a58aa9eb071ac8.zip | |
use API to restore arena_idx
Diffstat (limited to 'src')
| -rw-r--r-- | src/load.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/load.c b/src/load.c index d3e492856..6894ac1ef 100644 --- a/src/load.c +++ b/src/load.c @@ -502,7 +502,7 @@ mrb_read_irep(mrb_state *mrb, const char *bin) uint32_t len = 0; unsigned char *src; rite_binary_header bin_header; - int ai = mrb->arena_idx; + int ai = mrb_gc_arena_save(mrb); if ((mrb == NULL) || (bin == NULL)) { return MRB_DUMP_INVALID_ARGUMENT; @@ -540,7 +540,7 @@ mrb_read_irep(mrb_state *mrb, const char *bin) mrb->irep_len += nirep; error_exit: - mrb->arena_idx = ai; + mrb_gc_arena_restore(mrb, ai); if (ret != MRB_DUMP_OK) { for (n=0,i=sirep; n<nirep; n++,i++) { if (mrb->irep[i]) { |
