зеркало из https://github.com/github/ruby.git
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:
Родитель
06cb030516
Коммит
0cd86ffb2e
10
file.c
10
file.c
|
@ -6504,12 +6504,10 @@ rb_find_file(VALUE path)
|
||||||
return copy_path_class(tmp, path);
|
return copy_path_class(tmp, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
#define define_filetest_function(name, func, argc) do { \
|
||||||
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); \
|
||||||
rb_define_module_function(rb_mFileTest, name, func, argc);
|
} while(false)
|
||||||
rb_define_singleton_method(rb_cFile, name, func, argc);
|
|
||||||
}
|
|
||||||
|
|
||||||
const char ruby_null_device[] =
|
const char ruby_null_device[] =
|
||||||
#if defined DOSISH
|
#if defined DOSISH
|
||||||
|
|
Загрузка…
Ссылка в новой задаче