From patchwork Tue Feb 28 11:57:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mitsyanko Igor X-Patchwork-Id: 143436 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C621DB6EEC for ; Tue, 28 Feb 2012 22:58:05 +1100 (EST) Received: from localhost ([::1]:52072 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2Lgx-0002Ye-MW for incoming@patchwork.ozlabs.org; Tue, 28 Feb 2012 06:58:03 -0500 Received: from eggs.gnu.org ([208.118.235.92]:46614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2LgY-0001gl-4Y for qemu-devel@nongnu.org; Tue, 28 Feb 2012 06:57:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2LgJ-0005yu-IP for qemu-devel@nongnu.org; Tue, 28 Feb 2012 06:57:37 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:15733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2LgJ-0005yS-CG for qemu-devel@nongnu.org; Tue, 28 Feb 2012 06:57:23 -0500 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: TEXT/PLAIN Received: from euspt2 ([210.118.77.14]) by mailout4.w1.samsung.com (Sun Java(tm) System Messaging Server 6.3-8.04 (built Jul 29 2009; 32bit)) with ESMTP id <0M0300LE9QJK7780@mailout4.w1.samsung.com> for qemu-devel@nongnu.org; Tue, 28 Feb 2012 11:57:20 +0000 (GMT) Received: from dodo.rnd.samsung.ru ([106.109.8.162]) by spt2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0M03002SOQJBJK@spt2.w1.samsung.com> for qemu-devel@nongnu.org; Tue, 28 Feb 2012 11:57:20 +0000 (GMT) Date: Tue, 28 Feb 2012 15:57:11 +0400 From: Igor Mitsyanko In-reply-to: <1330430231-18778-1-git-send-email-i.mitsyanko@samsung.com> To: qemu-devel@nongnu.org Message-id: <1330430231-18778-3-git-send-email-i.mitsyanko@samsung.com> X-Mailer: git-send-email 1.7.4.1 References: <1330430231-18778-1-git-send-email-i.mitsyanko@samsung.com> X-detected-operating-system: by eggs.gnu.org: Solaris 9.1 X-Received-From: 210.118.77.14 Cc: Igor Mitsyanko , e.voevodin@samsung.com, kyungmin.park@samsung.com, d.solodkiy@samsung.com, anthony@codemonkey.ws, pbonzini@redhat.com, m.kozlov@samsung.com Subject: [Qemu-devel] [PATCH V2 2/2] qom/object.c: rename type_class_init() to type_initialize() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Function name type_class_init() gave us a wrong impression of separation of type's "class" and "object" entities initialization. Name type_initialize() is more appropriate for type_class_init() function (considering what operations it performs). Signed-off-by: Igor Mitsyanko --- qom/object.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qom/object.c b/qom/object.c index 6d31bc3..9acc624 100644 --- a/qom/object.c +++ b/qom/object.c @@ -206,7 +206,7 @@ static void type_class_interface_init(TypeImpl *ti, InterfaceImpl *iface) g_free(name); } -static void type_class_init(TypeImpl *ti) +static void type_initialize(TypeImpl *ti) { size_t class_size = sizeof(ObjectClass); int i; @@ -224,7 +224,7 @@ static void type_class_init(TypeImpl *ti) if (type_has_parent(ti)) { TypeImpl *parent = type_get_parent(ti); - type_class_init(parent); + type_initialize(parent); class_size = parent->class_size; g_assert(parent->class_size <= ti->class_size); @@ -278,7 +278,7 @@ void object_initialize_with_type(void *data, TypeImpl *type) Object *obj = data; g_assert(type != NULL); - type_class_init(type); + type_initialize(type); g_assert(type->instance_size >= sizeof(Object)); g_assert(type->abstract == false); @@ -370,7 +370,7 @@ Object *object_new_with_type(Type type) Object *obj; g_assert(type != NULL); - type_class_init(type); + type_initialize(type); obj = g_malloc(type->instance_size); object_initialize_with_type(obj, type); @@ -543,7 +543,7 @@ ObjectClass *object_class_by_name(const char *typename) return NULL; } - type_class_init(type); + type_initialize(type); return type->class; } @@ -563,7 +563,7 @@ static void object_class_foreach_tramp(gpointer key, gpointer value, TypeImpl *type = value; ObjectClass *k; - type_class_init(type); + type_initialize(type); k = type->class; if (!data->include_abstract && type->abstract) {