summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--include/ruby/ruby.h4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 152a77a3d1..b302612f76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue May 19 09:54:44 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * include/ruby/ruby.h (Data_Make_Struct0): needs function pointer
+ casts to fix function overloading in C++.
+
Tue May 19 09:43:56 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* include/ruby/ruby.h (Data_Make_Struct0, TypedData_Make_Struct0):
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 2cbd701c79..4433dbcbbd 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -1032,7 +1032,9 @@ void *rb_check_typeddata(VALUE, const rb_data_type_t *);
rb_data_object_wrap((klass),(sval),(RUBY_DATA_FUNC)(mark),(RUBY_DATA_FUNC)(free))
#define Data_Make_Struct0(result, klass, type, size, mark, free, sval) \
- VALUE result = rb_data_object_zalloc(klass, size, mark, free); \
+ VALUE result = rb_data_object_zalloc((klass), (size), \
+ (RUBY_DATA_FUNC)(mark), \
+ (RUBY_DATA_FUNC)(free)); \
(void)((sval) = (type *)DATA_PTR(result));
#ifdef __GNUC__