diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-21 18:51:39 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-21 18:51:39 +0000 |
commit | c5e4cd063838033dff617f360a5b670b9eedaece (patch) | |
tree | 778e478e788a5284ebdb9798c7193233be428ac3 /include/ruby | |
parent | c4d6f4c01e44aa48070d091649795c586f3583e6 (diff) | |
download | ruby-c5e4cd063838033dff617f360a5b670b9eedaece.tar.gz |
* cont.c: add Fiber#resume and Fiber.yield.
and Fiber::Core class to realize Coroutine.
* include/ruby/intern.h: declare rb_fiber_yield(), rb_fiber_resume(),
* enumerator.c: use above api.
* test/ruby/test_fiber.rb: fix and add tests for above changes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
-rw-r--r-- | include/ruby/intern.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/ruby/intern.h b/include/ruby/intern.h index a57bb1ed9e..485d3909b6 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -148,7 +148,8 @@ VALUE rb_singleton_class(VALUE); int rb_cmpint(VALUE, VALUE, VALUE); NORETURN(void rb_cmperr(VALUE, VALUE)); /* cont.c */ -VALUE rb_fiber_yield(VALUE fib, int argc, VALUE *args); +VALUE rb_fiber_resume(VALUE fib, int argc, VALUE *args); +VALUE rb_fiber_yield(int argc, VALUE *args); VALUE rb_fiber_current(void); /* enum.c */ /* enumerator.c */ |