summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-01 09:42:38 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-01 09:42:38 +0000
commit0b0db73683a163b62556e3c39320b350642e3191 (patch)
tree816b0f807ceea1627cfb090be0147bb619a12340 /error.c
parent42fc13311f0102f5668ebb837bd5f63c812e7b4b (diff)
2000-05-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r--error.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/error.c b/error.c
index 81ce8b71a6..7d29b8d7f6 100644
--- a/error.c
+++ b/error.c
@@ -402,6 +402,7 @@ typedef struct {
int n;
} syserr_index_entry;
+static VALUE syserr_error;
static VALUE syserr_list_b_general[16+1];
static VALUE syserr_list_b_os0[2+1];
static VALUE syserr_list_b_os1[5+1];
@@ -462,6 +463,11 @@ set_syserr(i, name)
VALUE error = rb_define_class_under(rb_mErrno, name, rb_eSystemCallError);
rb_define_const(error, "Errno", INT2FIX(i));
#ifdef __BEOS__
+ if (i == B_ERROR) {
+ syserr_error = error;
+ rb_global_variable(&syserr_error);
+ return error;
+ }
i -= B_GENERAL_ERROR_BASE;
ix = (i >> 12) & 0xf;
offset = (i >> 8) & 0xf;
@@ -495,6 +501,7 @@ get_syserr(int i)
VALUE *list;
int ix, offset;
+ if (i == B_ERROR) return syserr_error;
i -= B_GENERAL_ERROR_BASE;
ix = (i >> 12) & 0xf;
offset = (i >> 8) & 0xf;
@@ -686,6 +693,7 @@ init_syserr()
MEMZERO(syserr_list[ix + offset].list, VALUE, syserr_list[ix + offset].n);
}
}
+ set_syserr(B_ERROR, "ERROR");
#else
syserr_list = ALLOC_N(VALUE, sys_nerr+1);
MEMZERO(syserr_list, VALUE, sys_nerr+1);