qom: Constify object_get_canonical_path{,_component}()'s parameter
authorMarkus Armbruster <armbru@redhat.com>
Wed, 27 May 2020 08:47:53 +0000 (10:47 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 15 Jun 2020 19:34:25 +0000 (21:34 +0200)
Suggested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200527084754.7531-2-armbru@redhat.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
include/qom/object.h
qom/object.c

index c7c97ead60a2106b08bd3ae733343706fb7b5897..43858162adb7c013c700d19273c3021303716490 100644 (file)
@@ -1404,7 +1404,7 @@ Object *object_get_internal_root(void);
  * path is the path within the composition tree starting from the root.
  * %NULL if the object doesn't have a parent (and thus a canonical path).
  */
-char *object_get_canonical_path_component(Object *obj);
+char *object_get_canonical_path_component(const Object *obj);
 
 /**
  * object_get_canonical_path:
@@ -1412,7 +1412,7 @@ char *object_get_canonical_path_component(Object *obj);
  * Returns: The canonical path for a object.  This is the path within the
  * composition tree starting from the root.
  */
-char *object_get_canonical_path(Object *obj);
+char *object_get_canonical_path(const Object *obj);
 
 /**
  * object_resolve_path:
index b0ed560fd80e7af42533883c98ebc033dcb9c7ba..d1340ba3d9404b049e7eb46fb029aa932629af44 100644 (file)
@@ -1881,7 +1881,7 @@ object_property_add_const_link(Object *obj, const char *name,
                                 NULL, OBJ_PROP_LINK_DIRECT);
 }
 
-char *object_get_canonical_path_component(Object *obj)
+char *object_get_canonical_path_component(const Object *obj)
 {
     ObjectProperty *prop = NULL;
     GHashTableIter iter;
@@ -1906,7 +1906,7 @@ char *object_get_canonical_path_component(Object *obj)
     return NULL;
 }
 
-char *object_get_canonical_path(Object *obj)
+char *object_get_canonical_path(const Object *obj)
 {
     Object *root = object_get_root();
     char *newpath, *path = NULL;