From c5e4cd063838033dff617f360a5b670b9eedaece 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@13130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/intern.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') 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 */ -- cgit v1.2.3