qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Anthony Liguori" <aliguori@us.ibm.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Stefan Hajnoczi" <stefanha@redhat.com>
Subject: [Qemu-devel] [PATCH 2/3] qom: Make object_resolve_path_component() path argument const
Date: Tue, 15 Jan 2013 18:13:52 +0100	[thread overview]
Message-ID: <1358270033-18064-3-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1358270033-18064-1-git-send-email-stefanha@redhat.com>

From: Andreas Färber <afaerber@suse.de>

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>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 include/qom/object.h | 2 +-
 qom/object.c         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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.8.0.2

  parent reply	other threads:[~2013-01-15 17:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15 17:13 [Qemu-devel] [PULL 0/3] Trivial patches for 12 to 15 January 2013 Stefan Hajnoczi
2013-01-15 17:13 ` [Qemu-devel] [PATCH 1/3] Add libcacard/trace/generated-tracers.c to .gitignore Stefan Hajnoczi
2013-01-15 17:13 ` Stefan Hajnoczi [this message]
2013-01-15 17:13 ` [Qemu-devel] [PATCH 3/3] configure: try pkg-config for curses Stefan Hajnoczi
2013-01-15 22:57   ` Anthony Liguori
2013-01-15 23:34     ` [Qemu-devel] [PATCH 3/3 v2] " Vadim Evard
2013-01-15 23:39       ` Anthony Liguori
2013-01-16  1:18 ` [Qemu-devel] [PULL 0/3] Trivial patches for 12 to 15 January 2013 Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1358270033-18064-3-git-send-email-stefanha@redhat.com \
    --to=stefanha@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).