From: Igor Mitsyanko <i.mitsyanko@samsung.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qom: if @instance_size==0, assign size of object to parent object size
Date: Tue, 28 Feb 2012 15:09:07 +0400 [thread overview]
Message-ID: <4F4CB5D3.7060703@samsung.com> (raw)
In-Reply-To: <4F4CA68D.8050800@redhat.com>
On 02/28/2012 02:03 PM, Paolo Bonzini wrote:
> Il 28/02/2012 10:43, Igor Mitsyanko ha scritto:
>> On 02/28/2012 12:39 PM, Paolo Bonzini wrote:
>>> Il 28/02/2012 08:18, Igor Mitsyanko ha scritto:
>>>> QOM documentation states that for objects of type with @instance_size
>>>> == 0 size
>>>> will be assigned to match parent object's size. But currently this
>>>> feauture is
>>>> not implemented and qemu asserts during creation of object with zero
>>>> instance_size.
>>>> This patch adjusts actual behaviour in accordance with documentation.
>>>
>>> You can do it just once, in type_get_parent instead.
>
> Sorry, rewind. "You can do it in type_class_init instead" (you are
> obviously doing it just once since you assign to type->instance_size).
> type_class_init mostly deals with class initialization, but it's really
> the place where a type is hooked up with its parent...
Ok, that's obviously a much better approach.
Perhaps
> type_late_init would be a better name.
How about simple type_initialization()?
--
Mitsyanko Igor
ASWG, Moscow R&D center, Samsung Electronics
email: i.mitsyanko@samsung.com
next prev parent reply other threads:[~2012-02-28 11:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-28 7:18 [Qemu-devel] [PATCH] qom: if @instance_size==0, assign size of object to parent object size Igor Mitsyanko
2012-02-28 8:39 ` Paolo Bonzini
2012-02-28 9:43 ` Igor Mitsyanko
2012-02-28 10:03 ` Paolo Bonzini
2012-02-28 11:09 ` Igor Mitsyanko [this message]
2012-02-28 11:21 ` Paolo Bonzini
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=4F4CB5D3.7060703@samsung.com \
--to=i.mitsyanko@samsung.com \
--cc=pbonzini@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.