summaryrefslogtreecommitdiff
path: root/include/ruby/ruby.h
diff options
context:
space:
mode:
author卜部昌平 <[email protected]>2019-09-05 23:50:45 +0900
committer卜部昌平 <[email protected]>2019-09-06 15:50:58 +0900
commita569bc09e25a2ba813d0bec1228d9ff65330a3db (patch)
treeb8bb974a90c1d0685633c7ec6728b86b3dcaef99 /include/ruby/ruby.h
parentd6a94cffda6763c7ad3ac3830dcfe6a87e405fe4 (diff)
add include/ruby/backward/cxxanyargs.hpp
Compilation of extension libraries written in C++ are reportedly broken due to https://github.com/ruby/ruby/pull/2404 The root cause of this issue was that the definition of ANYARGS differ between C and C++, and that of C++ is incompatible with the updated ones. We are using the incompatibility against itself. In C++ two distinct function prototypes can be overloaded. We provide the old, ANYARGSed prototypes in addition to the current granular ones; and let the older ones warn about types.
Diffstat (limited to 'include/ruby/ruby.h')
-rw-r--r--include/ruby/ruby.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 893bd2b0b0..65bcd382f2 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -1968,6 +1968,7 @@ VALUE rb_iterate(VALUE(*)(VALUE),VALUE,rb_block_call_func_t,VALUE);
VALUE rb_block_call(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE);
VALUE rb_rescue(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE);
VALUE rb_rescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,...);
+VALUE rb_vrescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,va_list);
VALUE rb_ensure(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE),VALUE);
VALUE rb_catch(const char*,rb_block_call_func_t,VALUE);
VALUE rb_catch_obj(VALUE,rb_block_call_func_t,VALUE);
@@ -2820,4 +2821,8 @@ __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__(1
#endif
#endif
+#ifdef __cplusplus
+#include "backward/cxxanyargs.hpp"
+#endif
+
#endif /* RUBY_RUBY_H */