summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2022-09-14 11:32:24 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2022-09-21 11:44:09 +0900
commit0cd86ffb2e4b270084510a0ed056329ddc949e5d (patch)
tree85e84365b114c22757e84d1efbdc5529de97a792 /file.c
parent06cb0305161eaae0f006ffb3a7f341a5771f239f (diff)
downloadruby-0cd86ffb2e4b270084510a0ed056329ddc949e5d.tar.gz
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.
Diffstat (limited to 'file.c')
-rw-r--r--file.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/file.c b/file.c
index de7ed5e33b..862f9630df 100644
--- a/file.c
+++ b/file.c
@@ -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