* [Qemu-devel] [PATCH for-1.4 v2] qom: Make object_resolve_path_component() path argument const
@ 2013-01-15 1:55 Andreas Färber
2013-01-15 9:54 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Färber @ 2013-01-15 1:55 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, armbru, anthony, Andreas Färber
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: Andreas Färber <afaerber@suse.de>
---
include/qom/object.h | 2 +-
qom/object.c | 2 +-
2 Dateien geändert, 2 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-)
diff --git a/include/qom/object.h b/include/qom/object.h
index d43b289..1ef2f0e 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -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:
diff --git a/qom/object.c b/qom/object.c
index 351b88c..03e6f24 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -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) {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH for-1.4 v2] qom: Make object_resolve_path_component() path argument const
2013-01-15 1:55 [Qemu-devel] [PATCH for-1.4 v2] qom: Make object_resolve_path_component() path argument const Andreas Färber
@ 2013-01-15 9:54 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2013-01-15 9:54 UTC (permalink / raw)
To: Andreas Färber; +Cc: qemu-trivial, qemu-devel, anthony, armbru
On Tue, Jan 15, 2013 at 02:55:10AM +0100, Andreas Färber wrote:
> 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: Andreas Färber <afaerber@suse.de>
> ---
> include/qom/object.h | 2 +-
> qom/object.c | 2 +-
> 2 Dateien geändert, 2 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-)
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-15 9:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-15 1:55 [Qemu-devel] [PATCH for-1.4 v2] qom: Make object_resolve_path_component() path argument const Andreas Färber
2013-01-15 9:54 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).