diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-06 16:41:17 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-06 16:41:17 +0000 |
commit | 57b0b6c7b13d44bd7655eee7e315d09d72ada640 (patch) | |
tree | fe08b0c4a91dd1cdfd4b4b3cecc0be24b2a2b59d /include/ruby | |
parent | b3e977a4c03e435a9a6edd305b03a2769c31df96 (diff) | |
download | ruby-57b0b6c7b13d44bd7655eee7e315d09d72ada640.tar.gz |
* cont.c (rb_fiber_yield): change argument ordering. export.
* cont.c (rb_fiber_current): export
* include/ruby/intern.h: export several functions from cont.c.
* enumerator.c (enumerator_next): new method to implement external
iterator (generator) using fiber.
* enumerator.c (enumerator_next_p): new method to check whether
any element is left in the generator sequence.
* enumerator.c (enumerator_rewind): a new method to rewind the
generator sequence.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
-rw-r--r-- | include/ruby/intern.h | 3 | ||||
-rw-r--r-- | include/ruby/ruby.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/ruby/intern.h b/include/ruby/intern.h index 7d5970762e..a57bb1ed9e 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -147,6 +147,9 @@ VALUE rb_singleton_class(VALUE); /* compar.c */ 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_current(void); /* enum.c */ /* enumerator.c */ VALUE rb_enumeratorize(VALUE, VALUE, int, VALUE *); diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index ecf9088c79..8931421672 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -760,6 +760,7 @@ RUBY_EXTERN VALUE rb_cCont; RUBY_EXTERN VALUE rb_cDir; RUBY_EXTERN VALUE rb_cData; RUBY_EXTERN VALUE rb_cFalseClass; +RUBY_EXTERN VALUE rb_cFiber; RUBY_EXTERN VALUE rb_cFile; RUBY_EXTERN VALUE rb_cFixnum; RUBY_EXTERN VALUE rb_cFloat; |