win32/resolv: Cast method functions with RUBY_METHOD_FUNC

GCC 15 in C23 mode reads `ANYARGS` as `(void)`, so the bare function pointers are rejected against Ruby headers that do not add the cast themselves, as happened with Ruby 3.1 on Windows.

https://github.com/ruby/resolv/issues/92

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hiroshi SHIBATAandClaude Opus 5.5 committed 2026-09-26 06:01:21 +09:00
1 parent b49347c28a
commit e1182d114a
1 file changed
+5 -5
Notes: git 2026-09-25 21:01:59 +00:00
+5 -5
View File
@@ -247,11 +247,11 @@ InitVM_resolv(void)
reg_key_class = regkey;
rb_undef_alloc_func(regkey);
rb_define_private_method(singl, "get_dns_server_list", get_dns_server_list, 0);
rb_define_private_method(singl, "tcpip_params", tcpip_params_open, 0);
rb_define_method(regkey, "open", reg_open, 1);
rb_define_method(regkey, "each_key", reg_each_key, 0);
rb_define_method(regkey, "value", reg_value, 1);
rb_define_private_method(singl, "get_dns_server_list", RUBY_METHOD_FUNC(get_dns_server_list), 0);
rb_define_private_method(singl, "tcpip_params", RUBY_METHOD_FUNC(tcpip_params_open), 0);
rb_define_method(regkey, "open", RUBY_METHOD_FUNC(reg_open), 1);
rb_define_method(regkey, "each_key", RUBY_METHOD_FUNC(reg_each_key), 0);
rb_define_method(regkey, "value", RUBY_METHOD_FUNC(reg_value), 1);
}
void