Signed-off-by: Markus Armbruster <armbru@redhat.com> --- include/qom/object.h | 11 ----------- qom/object.c | 13 ++----------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/include/qom/object.h b/include/qom/object.h index c8cedfe0f89..dbfc29a2d6a 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -1616,17 +1616,6 @@ bool object_property_parse(Object *obj, const char *name, char *object_property_print(Object *obj, const char *name, bool human, Error **errp); -/** - * object_property_get_type: - * @obj: the object - * @name: the name of the property - * @errp: returns an error if this function fails - * - * Returns: The type name of the property. - */ -const char *object_property_get_type(Object *obj, const char *name, - Error **errp); - /** * object_get_root: * diff --git a/qom/object.c b/qom/object.c index 3c5a8f49154..47e5979aa06 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1802,16 +1802,6 @@ out: return string; } -const char *object_property_get_type(Object *obj, const char *name, Error **errp) -{ - ObjectProperty *prop = object_property_find_err(obj, name, errp); - if (prop == NULL) { - return NULL; - } - - return prop->type; -} - static const char *const root_containers[] = { "audiodevs", "chardevs", @@ -2024,7 +2014,8 @@ static Object *object_resolve_link(Object *obj, const char *name, g_autofree char *target_type = NULL; /* Go from link<FOO> to FOO. */ - type = object_property_get_type(obj, name, NULL); + ObjectProperty *prop = object_property_find_err(obj, name, NULL); + type = prop ? prop->type : NULL; target_type = g_strndup(&type[5], strlen(type) - 6); return object_resolve_and_typecheck(path, name, target_type, errp); } -- 2.55.0