mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Avoid implicit integer casting in backtrace.c and hash.c.
This commit is contained in:
+2
-2
@@ -79,7 +79,7 @@ each_backtrace(mrb_state *mrb, ptrdiff_t ciidx, const mrb_code *pc0, each_backtr
|
||||
static void
|
||||
print_backtrace(mrb_state *mrb, struct RObject *exc, mrb_value backtrace)
|
||||
{
|
||||
int i;
|
||||
mrb_int i;
|
||||
mrb_int n = RARRAY_LEN(backtrace);
|
||||
mrb_value *loc, mesg;
|
||||
FILE *stream = stderr;
|
||||
@@ -89,7 +89,7 @@ print_backtrace(mrb_state *mrb, struct RObject *exc, mrb_value backtrace)
|
||||
for (i=n-1,loc=&RARRAY_PTR(backtrace)[i]; i>0; i--,loc--) {
|
||||
if (mrb_string_p(*loc)) {
|
||||
fprintf(stream, "\t[%d] %.*s\n",
|
||||
i, (int)RSTRING_LEN(*loc), RSTRING_PTR(*loc));
|
||||
(int)i, (int)RSTRING_LEN(*loc), RSTRING_PTR(*loc));
|
||||
}
|
||||
}
|
||||
if (mrb_string_p(*loc)) {
|
||||
|
||||
+1
-2
@@ -222,9 +222,8 @@ static void
|
||||
ht_compact(mrb_state *mrb, htable *t)
|
||||
{
|
||||
segment *seg;
|
||||
mrb_int i;
|
||||
uint16_t i, i2;
|
||||
segment *seg2 = NULL;
|
||||
mrb_int i2;
|
||||
mrb_int size = 0;
|
||||
|
||||
if (t == NULL) return;
|
||||
|
||||
Reference in New Issue
Block a user