Add a const pointer to QAPITypeInfo in ObjectProperty. NULL for legacy properties, set by new QAPI-aware registration wrappers.
Signed-off-by: Marc-André Lureau <[email protected]> --- include/qom/object.h | 2 ++ qom/object.c | 1 + 2 files changed, 3 insertions(+) diff --git a/include/qom/object.h b/include/qom/object.h index 510885218ba..d47ae209170 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -15,6 +15,7 @@ #define QEMU_OBJECT_H #include "qapi/qapi-builtin-types.h" +#include "qapi/qapi-type-info.h" #include "qemu/module.h" struct TypeImpl; @@ -91,6 +92,7 @@ struct ObjectProperty char *name; char *type; char *description; + const QAPITypeInfo *qapi_type; ObjectPropertyAccessor *get; ObjectPropertyAccessor *set; ObjectPropertyResolve *resolve; diff --git a/qom/object.c b/qom/object.c index f981e270440..dd657903f7c 100644 --- a/qom/object.c +++ b/qom/object.c @@ -2803,6 +2803,7 @@ object_property_add_alias(Object *obj, const char *name, property_release_alias, prop); op->resolve = property_resolve_alias; + op->qapi_type = target_prop->qapi_type; if (target_prop->defval) { op->defval = qobject_ref(target_prop->defval); } -- 2.54.0
