From bb71c0e99060462478408a3d9ae428674e5ee013 Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 21 Aug 2007 18:51:39 +0000 Subject: * 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 --- include/ruby/intern.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/ruby') 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 */ -- cgit