diff options
| author | Lothar Scholz <[email protected]> | 2017-12-23 01:10:43 +0100 |
|---|---|---|
| committer | Lothar Scholz <[email protected]> | 2017-12-23 01:10:43 +0100 |
| commit | 06f90a3b45fa4f241bbc43e91287aa9a127dc8c3 (patch) | |
| tree | 46ab4c39e6784ac4bb6efbe4af28bfd6653d5f8c /mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c | |
| parent | 100f0e6759be8e439e586acf01032d2b8b96c6bd (diff) | |
| download | mruby-06f90a3b45fa4f241bbc43e91287aa9a127dc8c3.tar.gz mruby-06f90a3b45fa4f241bbc43e91287aa9a127dc8c3.zip | |
Make source compilable with C++17
Changes applied:
- Removing "register" keyword
- Fixing const pointer to pointer assignments
- Adding type casts to rb_malloc calls
Diffstat (limited to 'mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c')
| -rw-r--r-- | mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c b/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c index 43e538ab4..d3ccf08ae 100644 --- a/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c +++ b/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c @@ -193,7 +193,7 @@ mrb_debug_set_break_line(mrb_state *mrb, mrb_debug_context *dbg, const char *fil return MRB_DEBUG_BREAK_INVALID_LINENO; } - set_file = mrb_malloc(mrb, strlen(file) + 1); + set_file = (char*)mrb_malloc(mrb, strlen(file) + 1); index = dbg->bpnum; dbg->bp[index].bpno = dbg->next_bpno; @@ -230,14 +230,14 @@ mrb_debug_set_break_method(mrb_state *mrb, mrb_debug_context *dbg, const char *c } if (class_name != NULL) { - set_class = mrb_malloc(mrb, strlen(class_name) + 1); + set_class = (char*)mrb_malloc(mrb, strlen(class_name) + 1); strncpy(set_class, class_name, strlen(class_name) + 1); } else { set_class = NULL; } - set_method = mrb_malloc(mrb, strlen(method_name) + 1); + set_method = (char*)mrb_malloc(mrb, strlen(method_name) + 1); strncpy(set_method, method_name, strlen(method_name) + 1); @@ -503,5 +503,3 @@ mrb_debug_check_breakpoint_method(mrb_state *mrb, mrb_debug_context *dbg, struct return 0; } - - |
