1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

avoid ANYARGS

Use macro instead of a static functon.  This isn't very amusing but
doing this wihtout a macro (is possibe but) seems just too much.
This commit is contained in:
卜部昌平 2022-09-14 11:32:24 +09:00
parent 06cb030516
commit 0cd86ffb2e
Notes: git 2022-09-21 11:44:35 +09:00

10
file.c
View file

@ -6504,12 +6504,10 @@ rb_find_file(VALUE path)
return copy_path_class(tmp, path);
}
static void
define_filetest_function(const char *name, VALUE (*func)(ANYARGS), int argc)
{
rb_define_module_function(rb_mFileTest, name, func, argc);
rb_define_singleton_method(rb_cFile, name, func, argc);
}
#define define_filetest_function(name, func, argc) do { \
rb_define_module_function(rb_mFileTest, name, func, argc); \
rb_define_singleton_method(rb_cFile, name, func, argc); \
} while(false)
const char ruby_null_device[] =
#if defined DOSISH