diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-26 09:03:53 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-26 09:03:53 +0000 |
| commit | e02ba9dc4ad66101a0d9c4eb149e69cf0cdf3a51 (patch) | |
| tree | 2f24d196acd2f62efc4c0af9cf17f7da4417ef3b | |
| parent | 2dd66361f71773ee9d5310cdc647308693ea762f (diff) | |
* eval.c (Init_Cont): separated from Init_Thread() since
rb_provide() must be after Init_Array().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@21782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | eval.c | 22 | ||||
| -rw-r--r-- | inits.c | 2 |
3 files changed, 20 insertions, 9 deletions
@@ -1,3 +1,8 @@ +Mon Jan 26 18:03:52 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * eval.c (Init_Cont): separated from Init_Thread() since + rb_provide() must be after Init_Array(). + Mon Jan 26 16:00:40 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * array.c (rb_ary_aset): fixed arguments evaluation order. @@ -13390,6 +13390,19 @@ rb_cont_call(argc, argv, cont) return Qnil; } +void +Init_Cont() +{ + rb_cCont = rb_define_class("Continuation", rb_cObject); + rb_undef_alloc_func(rb_cCont); + rb_undef_method(CLASS_OF(rb_cCont), "new"); + rb_define_method(rb_cCont, "call", rb_cont_call, -1); + rb_define_method(rb_cCont, "[]", rb_cont_call, -1); + rb_define_global_function("callcc", rb_callcc, 0); + rb_global_variable(&cont_protect); + rb_provide("continuation.so"); +} + struct thgroup { int enclosed; VALUE group; @@ -13738,15 +13751,6 @@ Init_Thread() rb_define_method(rb_cThread, "inspect", rb_thread_inspect, 0); - rb_cCont = rb_define_class("Continuation", rb_cObject); - rb_undef_alloc_func(rb_cCont); - rb_undef_method(CLASS_OF(rb_cCont), "new"); - rb_define_method(rb_cCont, "call", rb_cont_call, -1); - rb_define_method(rb_cCont, "[]", rb_cont_call, -1); - rb_define_global_function("callcc", rb_callcc, 0); - rb_global_variable(&cont_protect); - rb_provide("continuation.so"); - cThGroup = rb_define_class("ThreadGroup", rb_cObject); rb_define_alloc_func(cThGroup, thgroup_s_alloc); rb_define_method(cThGroup, "list", thgroup_list, 0); @@ -16,6 +16,7 @@ void Init_Array _((void)); void Init_Bignum _((void)); void Init_Binding _((void)); void Init_Comparable _((void)); +void Init_Cont _((void)); void Init_Dir _((void)); void Init_Enumerable _((void)); void Init_Enumerator _((void)); @@ -76,6 +77,7 @@ rb_call_inits() Init_signal(); Init_process(); Init_load(); + Init_Cont(); Init_Proc(); Init_Binding(); Init_Math(); |
