diff mbox series

[v2,5/5] qom: Convert child and link properties to QAPI-aware registration

Message ID 20261105080310.1656968-6-armbru@redhat.com
State New
Headers show
Series qom/qdev: associate properties with QAPI types fixups | expand

Commit Message

Markus Armbruster Nov. 5, 2026, 8:03 a.m. UTC
Child and link properties get serialized as QOM paths, i.e. as
strings.  Use &str_type_info for them.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qom/object.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Marc-André Lureau Nov. 5, 2026, 12:20 p.m. UTC | #1
On Thu, Nov 5, 2026 at 12:03 PM Markus Armbruster <armbru@redhat.com> wrote:
>
> Child and link properties get serialized as QOM paths, i.e. as
> strings.  Use &str_type_info for them.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> ---
>  qom/object.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/qom/object.c b/qom/object.c
> index 774a976c8b..9276b7a435 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -1914,7 +1914,7 @@ object_property_try_add_child(Object *obj, const char *name,
>
>      type = g_strdup_printf("child<%s>", object_get_typename(child));
>
> -    op = object_property_try_add(obj, name, type, NULL,
> +    op = object_property_try_add(obj, name, type, &str_type_info,
>                                   object_get_child_property,
>                                   NULL, object_finalize_child_property,
>                                   child, errp);
> @@ -2109,7 +2109,7 @@ object_add_link_prop(Object *obj, const char *name,
>
>      full_type = g_strdup_printf("link<%s>", type);
>
> -    op = object_property_add(obj, name, full_type, NULL,
> +    op = object_property_add(obj, name, full_type, &str_type_info,
>                               object_get_link_property,
>                               check ? object_set_link_property : NULL,
>                               object_release_link_property,
> @@ -2146,7 +2146,7 @@ object_class_property_add_link(ObjectClass *oc,
>
>      full_type = g_strdup_printf("link<%s>", type);
>
> -    op = object_class_property_add(oc, name, full_type, NULL,
> +    op = object_class_property_add(oc, name, full_type, &str_type_info,
>                                     object_get_link_property,
>                                     check ? object_set_link_property : NULL,
>                                     object_release_link_property,
> --
> 2.55.0
>
diff mbox series

Patch

diff --git a/qom/object.c b/qom/object.c
index 774a976c8b..9276b7a435 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -1914,7 +1914,7 @@  object_property_try_add_child(Object *obj, const char *name,
 
     type = g_strdup_printf("child<%s>", object_get_typename(child));
 
-    op = object_property_try_add(obj, name, type, NULL,
+    op = object_property_try_add(obj, name, type, &str_type_info,
                                  object_get_child_property,
                                  NULL, object_finalize_child_property,
                                  child, errp);
@@ -2109,7 +2109,7 @@  object_add_link_prop(Object *obj, const char *name,
 
     full_type = g_strdup_printf("link<%s>", type);
 
-    op = object_property_add(obj, name, full_type, NULL,
+    op = object_property_add(obj, name, full_type, &str_type_info,
                              object_get_link_property,
                              check ? object_set_link_property : NULL,
                              object_release_link_property,
@@ -2146,7 +2146,7 @@  object_class_property_add_link(ObjectClass *oc,
 
     full_type = g_strdup_printf("link<%s>", type);
 
-    op = object_class_property_add(oc, name, full_type, NULL,
+    op = object_class_property_add(oc, name, full_type, &str_type_info,
                                    object_get_link_property,
                                    check ? object_set_link_property : NULL,
                                    object_release_link_property,