summaryrefslogtreecommitdiff
path: root/include/ruby
diff options
context:
space:
mode:
authorAlan Wu <[email protected]>2025-04-29 21:13:17 +0900
committerAlan Wu <[email protected]>2025-04-30 19:44:59 +0900
commit719486a642f0e282b02b958069b8b39b85b3aa1e ()
tree918fd3fd83caa42a83dfbb0fbcb39396807954f9 /include/ruby
parent39ba16e5a1dea831e2f73c34a735249a4d4cb0a9 (diff)
Fix C23 (GCC 15) WIN32 compatibility for rb_define_* functions
Fixes [Bug #21286]
Notes: Merged: https://.com/ruby/ruby/pull/13202
-rw-r--r--include/ruby/internal/anyargs.h22
1 files changed, 22 insertions, 0 deletions
@@ -84,12 +84,15 @@
#elif defined(_WIN32) || defined(__CYGWIN__)
# /* Skip due to [Bug #16134] */
#elif ! RBIMPL_HAS_ATTRIBUTE(transparent_union)
# /* :TODO: improve here, please find a way to support. */
#elif ! defined(HAVE_VA_ARGS_MACRO)
# /* :TODO: improve here, please find a way to support. */
#else
# /** @cond INTERNAL_MACRO */
@@ -348,6 +351,25 @@ RBIMPL_ANYARGS_DECL(rb_define_method, VALUE, const char *)
#endif /* __cplusplus */
/**
* This macro is to properly cast a function parameter of *_define_method
* family. It has been around since 1.x era so you can maximise backwards