From da24af34b9c46120376fdf3e42dd5c9949fecd5c Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Tue, 1 Aug 2017 22:17:51 +0900 Subject: Better class name management. The change removes several internal instance variables used by class name management. The variables `__classid__` and `__classpath__` are no longer available. `__outer__` is used only for unnamed outer classes/modules (and will be removed after they are named). [Important note] Along with this change we removed several public functions. - mrb_class_outer_module() - mrb_class_sym() We believe no one have used those functions, but if you do, please ask us for the workaround. --- mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'mrbgems/mruby-bin-debugger') diff --git a/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c b/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c index 4553a965a..a948216e9 100644 --- a/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c +++ b/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c @@ -112,17 +112,6 @@ check_file_lineno(struct mrb_irep *irep, const char *file, uint16_t lineno) return result; } -static const char* -get_class_name(mrb_state *mrb, struct RClass *class_obj) -{ - struct RClass *outer; - mrb_sym class_sym; - - outer = mrb_class_outer_module(mrb, class_obj); - class_sym = mrb_class_sym(mrb, class_obj, outer); - return mrb_sym2name(mrb, class_sym); -} - static int32_t compare_break_method(mrb_state *mrb, mrb_debug_breakpoint *bp, struct RClass *class_obj, mrb_sym method_sym, mrb_bool* isCfunc) { @@ -139,7 +128,7 @@ compare_break_method(mrb_state *mrb, mrb_debug_breakpoint *bp, struct RClass *cl method_p = &bp->point.methodpoint; if (strcmp(method_p->method_name, method_name) == 0) { - class_name = get_class_name(mrb, class_obj); + class_name = mrb_class_name(mrb, class_obj); if (class_name == NULL) { if (method_p->class_name == NULL) { return bp->bpno; @@ -166,8 +155,8 @@ compare_break_method(mrb_state *mrb, mrb_debug_breakpoint *bp, struct RClass *cl return MRB_DEBUG_OK; } - class_name = get_class_name(mrb, class_obj); - sn = get_class_name(mrb, sc); + class_name = mrb_class_name(mrb, class_obj); + sn = mrb_class_name(mrb, sc); if (strcmp(sn, class_name) == 0) { return bp->bpno; } -- cgit v1.2.3