mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
remove unused functions 'mrb_strerrno' and 'mrb_bug_errno'.
This commit is contained in:
-25
@@ -291,31 +291,6 @@ mrb_bug(const char *fmt, ...)
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
static const char *
|
||||
mrb_strerrno(int err)
|
||||
{
|
||||
#define defined_error(name, num) if (err == num) return name;
|
||||
#define undefined_error(name)
|
||||
//#include "known_errors.inc"
|
||||
#undef defined_error
|
||||
#undef undefined_error
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
mrb_bug_errno(const char *mesg, int errno_arg)
|
||||
{
|
||||
if (errno_arg == 0)
|
||||
mrb_bug("%s: errno == 0 (NOERROR)", mesg);
|
||||
else {
|
||||
const char *errno_str = mrb_strerrno(errno_arg);
|
||||
if (errno_str)
|
||||
mrb_bug("%s: %s (%s)", mesg, strerror(errno_arg), errno_str);
|
||||
else
|
||||
mrb_bug("%s: %s (%d)", mesg, strerror(errno_arg), errno_arg);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
sysexit_status(mrb_state *mrb, mrb_value err)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#define MRUBY_ERROR_H
|
||||
|
||||
void mrb_sys_fail(mrb_state *mrb, const char *mesg);
|
||||
void mrb_bug_errno(const char*, int);
|
||||
int sysexit_status(mrb_state *mrb, mrb_value err);
|
||||
mrb_value mrb_exc_new3(mrb_state *mrb, struct RClass* c, mrb_value str);
|
||||
mrb_value make_exception(mrb_state *mrb, int argc, mrb_value *argv, int isstr);
|
||||
|
||||
Reference in New Issue
Block a user