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 | bb71c0e99060462478408a3d9ae428674e5ee013 (patch) | |
tree | 778e478e788a5284ebdb9798c7193233be428ac3 /include | |
parent | c99478310d6ca0037f0d1f5a66d04bd8d463308a (diff) | |
download | ruby-bb71c0e99060462478408a3d9ae428674e5ee013.tar.gz ruby-bb71c0e99060462478408a3d9ae428674e5ee013.tar.xz ruby-bb71c0e99060462478408a3d9ae428674e5ee013.zip |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@13130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-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 a57bb1ed9..485d3909b 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 */ |