summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKohei Suzuki <[email protected]>2016-11-26 14:18:28 +0900
committerKohei Suzuki <[email protected]>2016-11-26 14:18:28 +0900
commit905203ef5edc269aca4178a084f3c62fbafaec82 (patch)
tree15ab9277918fe9fa39b1fbdc2675126adae831d8
parentb5e2dc90975e5304f7b1220656d6a9138b51cdee (diff)
downloadmruby-905203ef5edc269aca4178a084f3c62fbafaec82.tar.gz
mruby-905203ef5edc269aca4178a084f3c62fbafaec82.zip
Add explicit cast from void* to struct mrb_io*
For compatibility with C++.
-rw-r--r--src/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/io.c b/src/io.c
index 3177ec050..dd030b87a 100644
--- a/src/io.c
+++ b/src/io.c
@@ -445,7 +445,7 @@ mrb_io_initialize(mrb_state *mrb, mrb_value io)
mrb_iv_set(mrb, io, mrb_intern_cstr(mrb, "@buf"), mrb_str_new_cstr(mrb, ""));
mrb_iv_set(mrb, io, mrb_intern_cstr(mrb, "@pos"), mrb_fixnum_value(0));
- fptr = DATA_PTR(io);
+ fptr = (struct mrb_io *)DATA_PTR(io);
if (fptr != NULL) {
fptr_finalize(mrb, fptr, TRUE);
mrb_free(mrb, fptr);