qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mitsyanko <i.mitsyanko@samsung.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org,
	Igor Mitsyanko <i.mitsyanko@samsung.com>,
	e.voevodin@samsung.com, kyungmin.park@samsung.com,
	d.solodkiy@samsung.com, m.kozlov@samsung.com
Subject: [Qemu-devel] [PATCH 2/5] qom/object.c: rename type_class_init() to type_initialize()
Date: Fri, 02 Mar 2012 15:35:42 +0400	[thread overview]
Message-ID: <1330688145-22944-3-git-send-email-i.mitsyanko@samsung.com> (raw)
In-Reply-To: <1330688145-22944-1-git-send-email-i.mitsyanko@samsung.com>

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 <i.mitsyanko@samsung.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
 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) {
-- 
1.7.4.1

  parent reply	other threads:[~2012-03-02 11:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-02 11:35 [Qemu-devel] [PATCH 0/5] Exynos: i2c, gpio and touchscreen support for NURI board Igor Mitsyanko
2012-03-02 11:35 ` [Qemu-devel] [PATCH 1/5] qom: if @instance_size==0, assign size of object to parent object size Igor Mitsyanko
2012-03-02 11:35 ` Igor Mitsyanko [this message]
2012-03-06 18:52   ` [Qemu-devel] [PATCH 2/5] qom/object.c: rename type_class_init() to type_initialize() Peter Maydell
2012-03-02 11:35 ` [Qemu-devel] [PATCH 3/5] exynos4210: add Exynos4210 i2c implementation Igor Mitsyanko
2012-03-06 18:49   ` Peter Maydell
2012-03-07  7:49     ` Igor Mitsyanko
2012-03-02 11:35 ` [Qemu-devel] [PATCH 4/5] exynos4210: add exynos4210 GPIO implementation Igor Mitsyanko
2012-03-02 11:35 ` [Qemu-devel] [PATCH 5/5] hw: add Atmel maxtouch touchscreen implementation Igor Mitsyanko
2012-03-02 14:19   ` Andreas Färber
2012-03-02 14:43     ` Igor Mitsyanko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1330688145-22944-3-git-send-email-i.mitsyanko@samsung.com \
    --to=i.mitsyanko@samsung.com \
    --cc=d.solodkiy@samsung.com \
    --cc=e.voevodin@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=m.kozlov@samsung.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).