summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-03-03 10:08:06 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-03-03 10:08:06 +0000
commit7c35689239ea8d5acbb6253e7e045623136fa30c (patch)
tree2745d6fd124cdc5b9fd808db51551e7ad61b9640 /ext
parent72274ecae00ce17cebab6547c0eae81b4a5bdae7 (diff)
* ext/thread/thread.c (push_list): Use ALLOC().
* ext/thread/thread.c (rb_mutex_alloc): Ditto. * ext/thread/thread.c (rb_condvar_alloc): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@11970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/thread/thread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/thread/thread.c b/ext/thread/thread.c
index 354e144..e9dde37 100644
--- a/ext/thread/thread.c
+++ b/ext/thread/thread.c
@@ -100,7 +100,7 @@ push_list(List *list, VALUE value)
entry = list->entry_pool;
list->entry_pool = entry->next;
} else {
- entry = (Entry *)xmalloc(sizeof(Entry));
+ entry = ALLOC(Entry);
}
entry->value = value;
@@ -338,7 +338,7 @@ static VALUE
rb_mutex_alloc(VALUE klass)
{
Mutex *mutex;
- mutex = (Mutex *)xmalloc(sizeof(Mutex));
+ mutex = ALLOC(Mutex);
init_mutex(mutex);
return Data_Wrap_Struct(klass, mark_mutex, free_mutex, mutex);
}
@@ -605,7 +605,7 @@ rb_condvar_alloc(VALUE klass)
{
ConditionVariable *condvar;
- condvar = (ConditionVariable *)xmalloc(sizeof(ConditionVariable));
+ condvar = ALLOC(ConditionVariable);
init_condvar(condvar);
return Data_Wrap_Struct(klass, mark_condvar, free_condvar, condvar);
@@ -816,7 +816,7 @@ static VALUE
rb_queue_alloc(VALUE klass)
{
Queue *queue;
- queue = (Queue *)xmalloc(sizeof(Queue));
+ queue = ALLOC(Queue);
init_queue(queue);
return Data_Wrap_Struct(klass, mark_queue, free_queue, queue);
}