summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-05 07:18:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-05 07:18:52 +0000
commit430f5a1d61a1dae175f1e29840f7e7a91c1eaf1c (patch)
treed1d470920c2bda4178cd7d5545c46955005c4953 /vm.c
parent0af432ce08b33428b9dc6c5c60ffccee3f60fd77 (diff)
* 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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/vm.c b/vm.c
index 02d7986942..ea9e2a5b62 100644
--- a/vm.c
+++ b/vm.c
@@ -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;
}