Skip to content

Commit f5a86ca

Browse files
committed
Add pointer casting from mrb_malloc(); ref #3267
1 parent 798c69d commit f5a86ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/variable.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ iv_new(mrb_state *mrb)
4444
{
4545
iv_tbl *t;
4646

47-
t = mrb_malloc(mrb, sizeof(iv_tbl));
47+
t = (iv_tbl*)mrb_malloc(mrb, sizeof(iv_tbl));
4848
t->size = 0;
4949
t->rootseg = NULL;
5050
t->last_len = 0;
@@ -102,7 +102,7 @@ iv_put(mrb_state *mrb, iv_tbl *t, mrb_sym sym, mrb_value val)
102102
return;
103103
}
104104

105-
seg = mrb_malloc(mrb, sizeof(segment));
105+
seg = (segment*)mrb_malloc(mrb, sizeof(segment));
106106
if (!seg) return;
107107
seg->next = NULL;
108108
seg->key[0] = sym;

0 commit comments

Comments
 (0)