mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
internal/error.h rework
Reduce macros for readability. Also transplanted some part of internal/file.h into here because the delcared functions are in fact defined in error.c.
This commit is contained in:
parent
23c2a27bf6
commit
ec6f6b53d8
Notes:
git
2019-12-26 20:46:00 +09:00
2 changed files with 92 additions and 44 deletions
|
@ -26,22 +26,6 @@ VALUE rb_get_path_check_to_string(VALUE);
|
|||
VALUE rb_get_path_check_convert(VALUE);
|
||||
int ruby_is_fd_loadable(int fd);
|
||||
|
||||
#ifdef RUBY_FUNCTION_NAME_STRING
|
||||
# if defined __GNUC__ && __GNUC__ >= 4
|
||||
# pragma GCC visibility push(default)
|
||||
# endif
|
||||
NORETURN(void rb_sys_fail_path_in(const char *func_name, VALUE path));
|
||||
NORETURN(void rb_syserr_fail_path_in(const char *func_name, int err, VALUE path));
|
||||
# if defined __GNUC__ && __GNUC__ >= 4
|
||||
# pragma GCC visibility pop
|
||||
# endif
|
||||
# define rb_sys_fail_path(path) rb_sys_fail_path_in(RUBY_FUNCTION_NAME_STRING, path)
|
||||
# define rb_syserr_fail_path(err, path) rb_syserr_fail_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
|
||||
#else
|
||||
# define rb_sys_fail_path(path) rb_sys_fail_str(path)
|
||||
# define rb_syserr_fail_path(err, path) rb_syserr_fail_str((err), (path))
|
||||
#endif
|
||||
|
||||
RUBY_SYMBOL_EXPORT_BEGIN
|
||||
/* file.c (export) */
|
||||
#if defined HAVE_READLINK && defined RUBY_ENCODING_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue