summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c
diff options
context:
space:
mode:
authorLothar Scholz <[email protected]>2017-12-23 01:10:43 +0100
committerLothar Scholz <[email protected]>2017-12-23 01:10:43 +0100
commit06f90a3b45fa4f241bbc43e91287aa9a127dc8c3 (patch)
tree46ab4c39e6784ac4bb6efbe4af28bfd6653d5f8c /mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c
parent100f0e6759be8e439e586acf01032d2b8b96c6bd (diff)
downloadmruby-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/mrdb.c')
-rw-r--r--mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c b/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c
index d12dcd5da..0588dfca5 100644
--- a/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c
+++ b/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c
@@ -184,7 +184,7 @@ cleanup(mrb_state *mrb, struct _args *args)
static mrb_debug_context*
mrb_debug_context_new(mrb_state *mrb)
{
- mrb_debug_context *dbg = mrb_malloc(mrb, sizeof(mrb_debug_context));
+ mrb_debug_context *dbg = (mrb_debug_context*)mrb_malloc(mrb, sizeof(mrb_debug_context));
memset(dbg, 0, sizeof(mrb_debug_context));
@@ -223,12 +223,12 @@ mrb_debug_context_free(mrb_state *mrb)
static mrdb_state*
mrdb_state_new(mrb_state *mrb)
{
- mrdb_state *mrdb = mrb_malloc(mrb, sizeof(mrdb_state));
+ mrdb_state *mrdb = (mrdb_state*)mrb_malloc(mrb, sizeof(mrdb_state));
memset(mrdb, 0, sizeof(mrdb_state));
mrdb->dbg = mrb_debug_context_get(mrb);
- mrdb->command = mrb_malloc(mrb, MAX_COMMAND_LINE+1);
+ mrdb->command = (char*)mrb_malloc(mrb, MAX_COMMAND_LINE+1);
mrdb->print_no = 1;
return mrdb;