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 | 02a8c4dd0ef51e60dd4a17db4ebcc56560fb273d (patch) | |
| tree | fe08b0c4a91dd1cdfd4b4b3cecc0be24b2a2b59d /include/ruby | |
| parent | 0453dc68e4694830d1a34d65f8ff8dcc4321f453 (diff) | |
| download | ruby-02a8c4dd0ef51e60dd4a17db4ebcc56560fb273d.tar.gz ruby-02a8c4dd0ef51e60dd4a17db4ebcc56560fb273d.tar.xz ruby-02a8c4dd0ef51e60dd4a17db4ebcc56560fb273d.zip | |
* 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: http://svn.ruby-lang.org/repos/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 7d5970762..a57bb1ed9 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 ecf9088c7..893142167 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; |
