Il 21/01/2013 14:01, Andreas Färber ha scritto:
>> > BusState subclasses need to do their own allocation because
>> > qbus_create_inplace calls object_initialize (which wipes out the
>> > "free" callback).  This patch separates the initialization of the object
>> > (object_initialize) from its insertion in the qdev tree (qbus_realize); to
>> > do so, it moves the remaining bits of qbus_create_inplace to qbus_realize
>> > and export it as qbus_init.
>> > 
>> > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
> I think I left some comments on v1: Would it be possible to leave a
> bus_initialize() function (without q ;)) in place that calls
> object_initialize() plus the-artist-formerly-known-as-qbus_realize(),
> shared between object_new() and object_initialize()? ->free was always
> set afterwards. The issue I am trying to contain here is a surge of
> *_init functions beyond class_init, instance_init, DeviceClass::init.
> Sticking to the QOM naming of having *bus_initialize() and *bus_new()
> would address that.

Yes, you did and I thought about it but I had no good ideas really.  We
have a lot of differently named functions, but in the end "everything
before realize should be named init" sounds like the only sensible rule...

Paolo

Reply via email to