On 09/14/2015 10:11 PM, Paolo Bonzini wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256



On 14/09/2015 13:45, David Gibson wrote:

=== * There is no way for a child to determine what its parent
is.  It is not * a bidirectional relationship.  This is by
design. ===

This part always confused me as there is "Object *parent" in
the "struct Object". So there is way to determine but it must
not be used? Is it debug only?

Anyway, all members of the Object class are under /*< private
*/ so they should not be accesses in sPAPR code, I believe.
Ah, good point, I missed that.  I guess we have to keep the owner
field, redundant though it seems.  Blech.

I think the comment is wrong or at least inaccurate; it only applies
to the external QOM interface.


Is this case external?

Originally I was looking for a object_get_parent() but it is not there so I decided that the comment is correct or I just fail to understand it :)


The patch is a good idea, even though
OBJECT(x)->y traditionally is not used (instead you assign OBJECT(x) to
a different Object* variable).



--
Alexey

Reply via email to