> Subject: Re: [PATCH 0/3] Fix confused output for alias properties > > Il 22/09/2014 15:13, Gonglei (Arei) ha scritto: > > (I don't add alias-sepecific filed into ObjectProperty > > struct, just add a bool property. ) > > > > diff --git a/include/qom/object.h b/include/qom/object.h > > index 8a05a81..8b8ded5 100644 > > --- a/include/qom/object.h > > +++ b/include/qom/object.h > > @@ -334,6 +334,11 @@ typedef void (ObjectPropertyRelease)(Object *obj, > > const char *name, > > void *opaque); > > > > +typedef struct { > > + Object *target_obj; > > + const char *target_name; > > +} AliasProperty; > > + > > typedef struct ObjectProperty > > { > > gchar *name; > > @@ -344,6 +349,8 @@ typedef struct ObjectProperty > > ObjectPropertyRelease *release; > > void *opaque; > > > > + bool is_alias; > > + > > QTAILQ_ENTRY(ObjectProperty) node; > > } ObjectProperty; > > I don't think this is right. If the field is called "opaque", it's > opaque.
Sorry? > We already had cases where we were deriving the type of the > opaque, and they caused bugs (though it was using the const char *type > field; admittedly having a separate bool is a bit cleaner). > Sorry for my poor English. I can't understand your mean clearly. :( Would you explain it for me? Thanks a lot! Best regards, -Gonglei