diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-05-20 10:07:41 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-05-20 10:07:41 -0700 |
| commit | ebfebfc3658660ebdb4a32991d1eab736bfee504 (patch) | |
| tree | 08448056bc440124baab552e716c383f5e3f5ef7 /src/vm.c | |
| parent | ec8f97d2a6facab56ff78cc62ebf1928d06bed4a (diff) | |
| parent | 9e336b00e5934dbe583edfd1db6370fa4e78745d (diff) | |
| download | mruby-ebfebfc3658660ebdb4a32991d1eab736bfee504.tar.gz mruby-ebfebfc3658660ebdb4a32991d1eab736bfee504.zip | |
Merge pull request #171 from mitchblank/cplusplus
More C++ compilability work: mrb_obj_alloc void* conversions
Diffstat (limited to 'src/vm.c')
| -rw-r--r-- | src/vm.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -279,7 +279,7 @@ localjump_error(mrb_state *mrb, const char *kind) snprintf(buf, 256, "unexpected %s", kind); exc = mrb_exc_new(mrb, E_LOCALJUMP_ERROR, buf, strlen(buf)); - mrb->exc = mrb_object(exc); + mrb->exc = (struct RObject *) mrb_object(exc); } static void @@ -298,7 +298,7 @@ argnum_error(mrb_state *mrb, int num) mrb->ci->argc, num); } exc = mrb_exc_new(mrb, E_ARGUMENT_ERROR, buf, strlen(buf)); - mrb->exc = mrb_object(exc); + mrb->exc = (struct RObject *) mrb_object(exc); } #define SET_TRUE_VALUE(r) {\ @@ -625,7 +625,7 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self) CASE(OP_RAISE) { /* A raise(R(A)) */ - mrb->exc = mrb_object(regs[GETARG_A(i)]); + mrb->exc = (struct RObject *) mrb_object(regs[GETARG_A(i)]); goto L_RAISE; } @@ -1573,7 +1573,7 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self) mrb_value msg = pool[GETARG_Bx(i)]; mrb_value exc = mrb_exc_new3(mrb, mrb->eRuntimeError_class, msg); - mrb->exc = mrb_object(exc); + mrb->exc = (struct RObject *) mrb_object(exc); goto L_RAISE; } } |
