mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Fixes for compiling mruby as C++
This commit is contained in:
committed by
Yukihiro "Matz" Matsumoto
parent
477e12c182
commit
1af9e363f2
+2
-2
@@ -160,7 +160,7 @@ static void
|
||||
output_backtrace_i(mrb_state *mrb, struct backtrace_location_raw *loc_raw, void *data)
|
||||
{
|
||||
struct backtrace_location loc;
|
||||
struct output_backtrace_args *args = data;
|
||||
struct output_backtrace_args *args = (struct output_backtrace_args *)data;
|
||||
|
||||
loc.i = loc_raw->i;
|
||||
loc.lineno = loc_raw->lineno;
|
||||
@@ -338,7 +338,7 @@ save_backtrace_i(mrb_state *mrb,
|
||||
else {
|
||||
new_n_allocated = mrb->backtrace.n_allocated * 2;
|
||||
}
|
||||
mrb->backtrace.entries =
|
||||
mrb->backtrace.entries = (mrb_backtrace_entry *)
|
||||
mrb_realloc(mrb,
|
||||
mrb->backtrace.entries,
|
||||
sizeof(mrb_backtrace_entry) * new_n_allocated);
|
||||
|
||||
+1
-1
@@ -361,7 +361,7 @@ mrb_memsearch(const void *x0, mrb_int m, const void *y0, mrb_int n)
|
||||
return 0;
|
||||
}
|
||||
else if (m == 1) {
|
||||
const unsigned char *ys = memchr(y, *x, n);
|
||||
const unsigned char *ys = (const unsigned char *)memchr(y, *x, n);
|
||||
|
||||
if (ys)
|
||||
return ys - y;
|
||||
|
||||
Reference in New Issue
Block a user