diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-04-25 02:33:50 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-04-25 02:33:50 +0900 |
| commit | 8a04dd84930e50c3aa18126a8c0215df9ea20844 (patch) | |
| tree | 34d2142bc30a873c4b6e97eb19f5af13a9ea9efe /src | |
| parent | 320f0711f08c54b709fccfbc07ba696e26c1a717 (diff) | |
| parent | 4c8092fe0074956c19617aa96b03e1987a24c622 (diff) | |
| download | mruby-8a04dd84930e50c3aa18126a8c0215df9ea20844.tar.gz mruby-8a04dd84930e50c3aa18126a8c0215df9ea20844.zip | |
Merge pull request #2117 from kyab/fix_msvc_warning_backtrace.c
Fix MSVC warning for backtrace.c
Diffstat (limited to 'src')
| -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); |
