diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-05 07:18:52 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-05 07:18:52 +0000 |
commit | 430f5a1d61a1dae175f1e29840f7e7a91c1eaf1c (patch) | |
tree | d1d470920c2bda4178cd7d5545c46955005c4953 /vm.c | |
parent | 0af432ce08b33428b9dc6c5c60ffccee3f60fd77 (diff) | |
download | ruby-430f5a1d61a1dae175f1e29840f7e7a91c1eaf1c.tar.gz |
* proc.c (rb_proc_s_new): call initialize. [ruby-core:13824]
* proc.c (rb_proc_location): return file name and line number where
the proc is defined.
* thread.c (thread_s_new): call initialize. [ruby-core:13835]
* thread.c (thread_initialize): split initialize method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1664,11 +1664,14 @@ static VALUE thread_alloc(VALUE klass) { VALUE volatile obj; - //rb_thread_t *th = thread_recycle_struct(); - //obj = Data_Wrap_Struct(klass, rb_thread_mark, thread_free, th); +#ifdef USE_THREAD_RECYCLE + rb_thread_t *th = thread_recycle_struct(); + obj = Data_Wrap_Struct(klass, rb_thread_mark, thread_free, th); +#else rb_thread_t *th; obj = Data_Make_Struct(klass, rb_thread_t, rb_thread_mark, thread_free, th); +#endif return obj; } |