From 05b374b82461af2d68dfba472cf382bcc98379d7 Mon Sep 17 00:00:00 2001 From: normal Date: Sat, 13 Sep 2014 06:17:58 +0000 Subject: [PATCH] class.c: use ALLOC(rb_subclass_entry_t) It is easier to search for allocations by type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ class.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 051a199f2f..4b09bc1a41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Sep 13 15:16:31 2014 Eric Wong + + * class.c: use ALLOC(rb_subclass_entry_t) + Sat Sep 13 14:14:00 2014 Eric Wong * process.c (free_exec_arg): remove diff --git a/class.c b/class.c index 43105b815a..e508a43ee5 100644 --- a/class.c +++ b/class.c @@ -42,7 +42,7 @@ rb_class_subclass_add(VALUE super, VALUE klass) rb_subclass_entry_t *entry, *head; if (super && super != Qundef) { - entry = xmalloc(sizeof(*entry)); + entry = ALLOC(rb_subclass_entry_t); entry->klass = klass; entry->next = NULL; @@ -62,7 +62,7 @@ rb_module_add_to_subclasses_list(VALUE module, VALUE iclass) { rb_subclass_entry_t *entry, *head; - entry = xmalloc(sizeof(*entry)); + entry = ALLOC(rb_subclass_entry_t); entry->klass = iclass; entry->next = NULL;