diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-08-01 22:17:51 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-08-01 22:25:49 +0900 |
| commit | da24af34b9c46120376fdf3e42dd5c9949fecd5c (patch) | |
| tree | fc1ec07883875bbd01d5505de4bb9dc25316e579 /mrbgems/mruby-bin-debugger | |
| parent | 2170fad406ecbb7a9ace6f762a376b3bdc860352 (diff) | |
| download | mruby-da24af34b9c46120376fdf3e42dd5c9949fecd5c.tar.gz mruby-da24af34b9c46120376fdf3e42dd5c9949fecd5c.zip | |
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.
Diffstat (limited to 'mrbgems/mruby-bin-debugger')
| -rw-r--r-- | mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c | 17 |
1 files changed, 3 insertions, 14 deletions
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; } |
