summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-08-09 11:17:25 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-08-09 11:17:25 +0000
commitdb537ebae35f162e89a38672155886c080d529f1 (patch)
tree4fcaf74798ecfbfee2948de7520ffe190c2d8804 /eval.c
parent61556330682130b85c34f13d9a54ef95b8fc6529 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/eval.c b/eval.c
index c36ce31661..cf61825a97 100644
--- a/eval.c
+++ b/eval.c
@@ -8092,16 +8092,15 @@ rb_callcc(self)
struct tag *tag;
THREAD_ALLOC(th);
- th->status = THREAD_KILLED;
- th->thread = cont = Data_Wrap_Struct(rb_cCont, thread_mark,
+ cont = Data_Wrap_Struct(rb_cCont, thread_mark,
thread_free, th);
FL_SET(ruby_scope, SCOPE_DONT_RECYCLE);
for (tag=prot_tag; tag; tag=tag->prev) {
scope_dup(tag->scope);
}
- th->prev = 0;
- th->next = curr_thread;
+ th->prev = th->next = 0;
+ th->thread = curr_thread->thread;
if (THREAD_SAVE_CONTEXT(th)) {
return th->result;
}
@@ -8118,7 +8117,7 @@ rb_cont_call(argc, argv, cont)
{
rb_thread_t th = rb_thread_check(cont);
- if (th->next != curr_thread) {
+ if (th->thread != curr_thread->thread) {
rb_raise(rb_eRuntimeError, "continuation called across threads");
}
switch (argc) {