small cosmetic variable renaming

parent 07e8f800
...@@ -62,7 +62,7 @@ mrb_output_backtrace(mrb_state *mrb, struct RObject *exc, output_stream_func fun ...@@ -62,7 +62,7 @@ mrb_output_backtrace(mrb_state *mrb, struct RObject *exc, output_stream_func fun
mrb_callinfo *ci; mrb_callinfo *ci;
mrb_int ciidx; mrb_int ciidx;
const char *filename, *method, *sep; const char *filename, *method, *sep;
int i, line; int i, lineno;
func(mrb, stream, 1, "trace:\n"); func(mrb, stream, 1, "trace:\n");
ciidx = mrb_fixnum(mrb_obj_iv_get(mrb, exc, mrb_intern_lit(mrb, "ciidx"))); ciidx = mrb_fixnum(mrb_obj_iv_get(mrb, exc, mrb_intern_lit(mrb, "ciidx")));
...@@ -72,7 +72,7 @@ mrb_output_backtrace(mrb_state *mrb, struct RObject *exc, output_stream_func fun ...@@ -72,7 +72,7 @@ mrb_output_backtrace(mrb_state *mrb, struct RObject *exc, output_stream_func fun
for (i = ciidx; i >= 0; i--) { for (i = ciidx; i >= 0; i--) {
ci = &mrb->c->cibase[i]; ci = &mrb->c->cibase[i];
filename = NULL; filename = NULL;
line = -1; lineno = -1;
if (MRB_PROC_CFUNC_P(ci->proc)) { if (MRB_PROC_CFUNC_P(ci->proc)) {
continue; continue;
...@@ -91,9 +91,9 @@ mrb_output_backtrace(mrb_state *mrb, struct RObject *exc, output_stream_func fun ...@@ -91,9 +91,9 @@ mrb_output_backtrace(mrb_state *mrb, struct RObject *exc, output_stream_func fun
pc = (mrb_code*)mrb_cptr(mrb_obj_iv_get(mrb, exc, mrb_intern_lit(mrb, "lastpc"))); pc = (mrb_code*)mrb_cptr(mrb_obj_iv_get(mrb, exc, mrb_intern_lit(mrb, "lastpc")));
} }
filename = mrb_debug_get_filename(irep, pc - irep->iseq); filename = mrb_debug_get_filename(irep, pc - irep->iseq);
line = mrb_debug_get_line(irep, pc - irep->iseq); lineno = mrb_debug_get_line(irep, pc - irep->iseq);
} }
if (line == -1) continue; if (lineno == -1) continue;
if (ci->target_class == ci->proc->target_class) if (ci->target_class == ci->proc->target_class)
sep = "."; sep = ".";
else else
...@@ -109,18 +109,18 @@ mrb_output_backtrace(mrb_state *mrb, struct RObject *exc, output_stream_func fun ...@@ -109,18 +109,18 @@ mrb_output_backtrace(mrb_state *mrb, struct RObject *exc, output_stream_func fun
if (cn) { if (cn) {
func(mrb, stream, 1, "\t[%d] ", i); func(mrb, stream, 1, "\t[%d] ", i);
func(mrb, stream, 0, "%s:%d:in %s%s%s", filename, line, cn, sep, method); func(mrb, stream, 0, "%s:%d:in %s%s%s", filename, lineno, cn, sep, method);
func(mrb, stream, 1, "\n"); func(mrb, stream, 1, "\n");
} }
else { else {
func(mrb, stream, 1, "\t[%d] ", i); func(mrb, stream, 1, "\t[%d] ", i);
func(mrb, stream, 0, "%s:%d:in %s", filename, line, method); func(mrb, stream, 0, "%s:%d:in %s", filename, lineno, method);
func(mrb, stream, 1, "\n"); func(mrb, stream, 1, "\n");
} }
} }
else { else {
func(mrb, stream, 1, "\t[%d] ", i); func(mrb, stream, 1, "\t[%d] ", i);
func(mrb, stream, 0, "%s:%d", filename, line); func(mrb, stream, 0, "%s:%d", filename, lineno);
func(mrb, stream, 1, "\n"); func(mrb, stream, 1, "\n");
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment