summaryrefslogtreecommitdiffhomepage
path: root/src/error.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2013-03-25 08:01:49 -0700
committerYukihiro "Matz" Matsumoto <[email protected]>2013-03-25 08:01:49 -0700
commite350e311360a7bcda0d44ebf105415112bcd60dc (patch)
tree990bb8671ec913fb0fe1227f375f220527646717 /src/error.c
parent9d550390e5e3e85daffc0d430abad8291d472380 (diff)
parentc2c95f09e546ae46a0d6652bbd97ce142f1becf4 (diff)
downloadmruby-e350e311360a7bcda0d44ebf105415112bcd60dc.tar.gz
mruby-e350e311360a7bcda0d44ebf105415112bcd60dc.zip
Merge pull request #1071 from crimsonwoods/remove_strerror
remove unused functions 'mrb_strerrno' and 'mrb_bug_errno'.
Diffstat (limited to 'src/error.c')
-rw-r--r--src/error.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/error.c b/src/error.c
index 6cf160801..ab5480e97 100644
--- a/src/error.c
+++ b/src/error.c
@@ -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)
{