提交 3e84b483 编写于 作者: A Andreas Färber 提交者: Stefan Hajnoczi

qom: Make object_resolve_path_component() path argument const

A usage with a hardcoded partial path such as

  object_resolve_path_component(obj, "foo")

is totally valid but currently leads to a compilation error. Fix this.
Signed-off-by: NAndreas Färber <afaerber@suse.de>
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 a87eec76
......@@ -900,7 +900,7 @@ Object *object_resolve_path_type(const char *path, const char *typename,
*
* Returns: The resolved object or NULL on path lookup failure.
*/
Object *object_resolve_path_component(Object *parent, gchar *part);
Object *object_resolve_path_component(Object *parent, const gchar *part);
/**
* object_property_add_child:
......
......@@ -1017,7 +1017,7 @@ gchar *object_get_canonical_path(Object *obj)
return newpath;
}
Object *object_resolve_path_component(Object *parent, gchar *part)
Object *object_resolve_path_component(Object *parent, const gchar *part)
{
ObjectProperty *prop = object_property_find(parent, part, NULL);
if (prop == NULL) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册