small cosmetic variable renaming

This commit is contained in:
Yukihiro "Matz" Matsumoto
2014-01-06 14:24:33 +09:00
parent 07e8f80040
commit fe19ac2bcd
+7 -7
View File
@@ -62,7 +62,7 @@ mrb_output_backtrace(mrb_state *mrb, struct RObject *exc, output_stream_func fun
mrb_callinfo *ci;
mrb_int ciidx;
const char *filename, *method, *sep;
int i, line;
int i, lineno;
func(mrb, stream, 1, "trace:\n");
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
for (i = ciidx; i >= 0; i--) {
ci = &mrb->c->cibase[i];
filename = NULL;
line = -1;
lineno = -1;
if (MRB_PROC_CFUNC_P(ci->proc)) {
continue;
@@ -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")));
}
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)
sep = ".";
else
@@ -109,18 +109,18 @@ mrb_output_backtrace(mrb_state *mrb, struct RObject *exc, output_stream_func fun
if (cn) {
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");
}
else {
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");
}
}
else {
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");
}
}