summaryrefslogtreecommitdiff
path: root/eval_intern.h
diff options
context:
space:
mode:
Diffstat (limited to 'eval_intern.h')
-rw-r--r--eval_intern.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/eval_intern.h b/eval_intern.h
index b5133f0..0c50331 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -195,16 +195,17 @@ while (0)
void rb_thread_cleanup(void);
void rb_thread_wait_other_threads(void);
-#define RAISED_EXCEPTION 1
-#define RAISED_STACKOVERFLOW 2
+enum {
+ RAISED_EXCEPTION = 1,
+ RAISED_STACKOVERFLOW,
+ RAISED_NOMEMORY,
+};
int rb_thread_set_raised(rb_thread_t *th);
int rb_thread_reset_raised(rb_thread_t *th);
-#define rb_thread_set_stack_overflow(th) \
- ((th)->raised_flag |= RAISED_STACKOVERFLOW)
-#define rb_thread_reset_stack_overflow(th) \
- ((th)->raised_flag &= ~RAISED_STACKOVERFLOW)
-#define rb_thread_stack_overflowing_p(th) \
- (((th)->raised_flag & RAISED_STACKOVERFLOW) != 0)
+#define rb_thread_raised_set(th, f) ((th)->raised_flag |= (f))
+#define rb_thread_raised_reset(th, f) ((th)->raised_flag &= ~(f))
+#define rb_thread_raised_p(th, f) (((th)->raised_flag & (f)) != 0)
+#define rb_thread_raised_clear(th) ((th)->raised_flag = 0)
VALUE rb_f_eval(int argc, VALUE *argv, VALUE self);
VALUE rb_make_exception(int argc, VALUE *argv);