mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
2dd66361f7
commit
e02ba9dc4a
3 changed files with 20 additions and 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>
|
Mon Jan 26 16:00:40 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* array.c (rb_ary_aset): fixed arguments evaluation order.
|
* array.c (rb_ary_aset): fixed arguments evaluation order.
|
||||||
|
|
22
eval.c
22
eval.c
|
@ -13390,6 +13390,19 @@ rb_cont_call(argc, argv, cont)
|
||||||
return Qnil;
|
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 {
|
struct thgroup {
|
||||||
int enclosed;
|
int enclosed;
|
||||||
VALUE group;
|
VALUE group;
|
||||||
|
@ -13738,15 +13751,6 @@ Init_Thread()
|
||||||
|
|
||||||
rb_define_method(rb_cThread, "inspect", rb_thread_inspect, 0);
|
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);
|
cThGroup = rb_define_class("ThreadGroup", rb_cObject);
|
||||||
rb_define_alloc_func(cThGroup, thgroup_s_alloc);
|
rb_define_alloc_func(cThGroup, thgroup_s_alloc);
|
||||||
rb_define_method(cThGroup, "list", thgroup_list, 0);
|
rb_define_method(cThGroup, "list", thgroup_list, 0);
|
||||||
|
|
2
inits.c
2
inits.c
|
@ -16,6 +16,7 @@ void Init_Array _((void));
|
||||||
void Init_Bignum _((void));
|
void Init_Bignum _((void));
|
||||||
void Init_Binding _((void));
|
void Init_Binding _((void));
|
||||||
void Init_Comparable _((void));
|
void Init_Comparable _((void));
|
||||||
|
void Init_Cont _((void));
|
||||||
void Init_Dir _((void));
|
void Init_Dir _((void));
|
||||||
void Init_Enumerable _((void));
|
void Init_Enumerable _((void));
|
||||||
void Init_Enumerator _((void));
|
void Init_Enumerator _((void));
|
||||||
|
@ -76,6 +77,7 @@ rb_call_inits()
|
||||||
Init_signal();
|
Init_signal();
|
||||||
Init_process();
|
Init_process();
|
||||||
Init_load();
|
Init_load();
|
||||||
|
Init_Cont();
|
||||||
Init_Proc();
|
Init_Proc();
|
||||||
Init_Binding();
|
Init_Binding();
|
||||||
Init_Math();
|
Init_Math();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue