mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* cont.c (cont_restore_1, rb_cont_call): should be Fiber.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
055fb06700
commit
f7f3f9bf76
2 changed files with 10 additions and 6 deletions
|
@ -1,3 +1,7 @@
|
|||
Wed Sep 9 10:51:46 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* cont.c (cont_restore_1, rb_cont_call): should be Fiber.
|
||||
|
||||
Wed Sep 9 00:27:29 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* cont.c (cont_data_type, fiber_data_type): typed.
|
||||
|
|
12
cont.c
12
cont.c
|
@ -356,10 +356,10 @@ cont_restore_1(rb_context_t *cont)
|
|||
fib = th->fiber ? th->fiber : th->root_fiber;
|
||||
|
||||
if (fib) {
|
||||
rb_context_t *fcont;
|
||||
GetContPtr(fib, fcont);
|
||||
th->stack_size = fcont->saved_thread.stack_size;
|
||||
th->stack = fcont->saved_thread.stack;
|
||||
rb_fiber_t *fcont;
|
||||
GetFiberPtr(fib, fcont);
|
||||
th->stack_size = fcont->cont.saved_thread.stack_size;
|
||||
th->stack = fcont->cont.saved_thread.stack;
|
||||
}
|
||||
#ifdef CAPTURE_JUST_VALID_VM_STACK
|
||||
MEMCPY(th->stack, cont->vm_stack, VALUE, cont->vm_stack_slen);
|
||||
|
@ -620,8 +620,8 @@ rb_cont_call(int argc, VALUE *argv, VALUE contval)
|
|||
rb_raise(rb_eRuntimeError, "continuation called across trap");
|
||||
}
|
||||
if (cont->saved_thread.fiber) {
|
||||
rb_context_t *fcont;
|
||||
GetContPtr(cont->saved_thread.fiber, fcont);
|
||||
rb_fiber_t *fcont;
|
||||
GetFiberPtr(cont->saved_thread.fiber, fcont);
|
||||
|
||||
if (th->fiber != cont->saved_thread.fiber) {
|
||||
rb_raise(rb_eRuntimeError, "continuation called across fiber");
|
||||
|
|
Loading…
Reference in a new issue