From a569bc09e25a2ba813d0bec1228d9ff65330a3db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Thu, 5 Sep 2019 23:50:45 +0900 Subject: 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. --- include/ruby/ruby.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/ruby/ruby.h') 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 */ -- cgit v1.2.3