Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Delete ANYARGS #2404
After 5e86b00, I now think ANYARGS is dangerous and should be extinct. This commit uses rb_gvar_getter_t / rb_gvar_setter_t for rb_define_hooked_variable / rb_define_virtual_variable which revealed lots of function prototype inconsistencies. Some of them were literally decades old, going back to dda5dc0.
Compilation of extension libraries written in C++ are reportedly broken due to #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.
@sodabrew Currently, if you are using C++ and stick to old style, your compiler complains about it but compiles nonetheless. I suggest there are two possible best practices:
@shyouhei Just to give you a note: FXRuby failed to build due to latest changes to ANYARGS and C++ type checking/depreciation. I had to do a bunch of changes to make it to compile again and not raising any warnings. So the ANYARGS changes in ruby break backward compatibility in some cases.
However I'm glad to see these changes! I always wondered, why ruby's C-API makes overly much use of ANYARGS. It also revieled some broken function signatures in FXRuby.
in response to the declaration change in e3fc30564e9466d6926f9d25a090dcf787bd5c33. Fixing the AppVeyor mswin CI failure: https://ci.appveyor.com/project/ruby/ruby/builds/26980881/job/2j6h1qwjnbc8cpop ref: ruby/ruby#2404