diff options
| author | kyab <[email protected]> | 2014-04-24 22:10:19 +0900 |
|---|---|---|
| committer | kyab <[email protected]> | 2014-04-24 22:10:19 +0900 |
| commit | 4c8092fe0074956c19617aa96b03e1987a24c622 (patch) | |
| tree | ae9be64e3f1c5ad0d56a945a09657a5a2d25427e | |
| parent | 18c4741883b69fbd35daf9ef79592a54cc03f0e9 (diff) | |
| download | mruby-4c8092fe0074956c19617aa96b03e1987a24c622.tar.gz mruby-4c8092fe0074956c19617aa96b03e1987a24c622.zip | |
Fix MSVC warning for backtrace.c
| -rw-r--r-- | src/backtrace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backtrace.c b/src/backtrace.c index c18a7cb95..e6a28d471 100644 --- a/src/backtrace.c +++ b/src/backtrace.c @@ -89,8 +89,8 @@ output_backtrace(mrb_state *mrb, mrb_int ciidx, mrb_code *pc0, output_stream_fun else { pc = pc0; } - filename = mrb_debug_get_filename(irep, pc - irep->iseq); - lineno = mrb_debug_get_line(irep, pc - irep->iseq); + filename = mrb_debug_get_filename(irep, (uint32_t)(pc - irep->iseq)); + lineno = mrb_debug_get_line(irep, (uint32_t)(pc - irep->iseq)); } if (lineno == -1) continue; if (ci->target_class == ci->proc->target_class) @@ -169,7 +169,7 @@ mrb_get_backtrace(mrb_state *mrb) mrb_value ary; mrb_callinfo *ci = mrb->c->ci; mrb_code *pc = ci->pc; - mrb_int ciidx = ci - mrb->c->cibase - 1; + mrb_int ciidx = (mrb_int)(ci - mrb->c->cibase - 1); if (ciidx < 0) ciidx = 0; ary = mrb_ary_new(mrb); |
