Loading qom/object.c +15 −5 Original line number Diff line number Diff line Loading @@ -296,6 +296,16 @@ void object_initialize(void *data, const char *typename) object_initialize_with_type(data, type); } static inline bool object_property_is_child(ObjectProperty *prop) { return strstart(prop->type, "child<", NULL); } static inline bool object_property_is_link(ObjectProperty *prop) { return strstart(prop->type, "link<", NULL); } static void object_property_del_all(Object *obj) { while (!QTAILQ_EMPTY(&obj->properties)) { Loading @@ -318,7 +328,7 @@ static void object_property_del_child(Object *obj, Object *child, Error **errp) ObjectProperty *prop; QTAILQ_FOREACH(prop, &obj->properties, node) { if (strstart(prop->type, "child<", NULL) && prop->opaque == child) { if (object_property_is_child(prop) && prop->opaque == child) { object_property_del(obj, prop->name, errp); break; } Loading Loading @@ -1008,7 +1018,7 @@ gchar *object_get_canonical_path(Object *obj) g_assert(obj->parent != NULL); QTAILQ_FOREACH(prop, &obj->parent->properties, node) { if (!strstart(prop->type, "child<", NULL)) { if (!object_property_is_child(prop)) { continue; } Loading Loading @@ -1042,9 +1052,9 @@ Object *object_resolve_path_component(Object *parent, gchar *part) return NULL; } if (strstart(prop->type, "link<", NULL)) { if (object_property_is_link(prop)) { return *(Object **)prop->opaque; } else if (strstart(prop->type, "child<", NULL)) { } else if (object_property_is_child(prop)) { return prop->opaque; } else { return NULL; Loading Loading @@ -1087,7 +1097,7 @@ static Object *object_resolve_partial_path(Object *parent, QTAILQ_FOREACH(prop, &parent->properties, node) { Object *found; if (!strstart(prop->type, "child<", NULL)) { if (!object_property_is_child(prop)) { continue; } Loading Loading
qom/object.c +15 −5 Original line number Diff line number Diff line Loading @@ -296,6 +296,16 @@ void object_initialize(void *data, const char *typename) object_initialize_with_type(data, type); } static inline bool object_property_is_child(ObjectProperty *prop) { return strstart(prop->type, "child<", NULL); } static inline bool object_property_is_link(ObjectProperty *prop) { return strstart(prop->type, "link<", NULL); } static void object_property_del_all(Object *obj) { while (!QTAILQ_EMPTY(&obj->properties)) { Loading @@ -318,7 +328,7 @@ static void object_property_del_child(Object *obj, Object *child, Error **errp) ObjectProperty *prop; QTAILQ_FOREACH(prop, &obj->properties, node) { if (strstart(prop->type, "child<", NULL) && prop->opaque == child) { if (object_property_is_child(prop) && prop->opaque == child) { object_property_del(obj, prop->name, errp); break; } Loading Loading @@ -1008,7 +1018,7 @@ gchar *object_get_canonical_path(Object *obj) g_assert(obj->parent != NULL); QTAILQ_FOREACH(prop, &obj->parent->properties, node) { if (!strstart(prop->type, "child<", NULL)) { if (!object_property_is_child(prop)) { continue; } Loading Loading @@ -1042,9 +1052,9 @@ Object *object_resolve_path_component(Object *parent, gchar *part) return NULL; } if (strstart(prop->type, "link<", NULL)) { if (object_property_is_link(prop)) { return *(Object **)prop->opaque; } else if (strstart(prop->type, "child<", NULL)) { } else if (object_property_is_child(prop)) { return prop->opaque; } else { return NULL; Loading Loading @@ -1087,7 +1097,7 @@ static Object *object_resolve_partial_path(Object *parent, QTAILQ_FOREACH(prop, &parent->properties, node) { Object *found; if (!strstart(prop->type, "child<", NULL)) { if (!object_property_is_child(prop)) { continue; } Loading