[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH 01/10] qom: Make object_resolve_path_
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH 01/10] qom: Make object_resolve_path_component() path argument const |
Date: |
Mon, 14 Jan 2013 13:19:32 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
Andreas Färber <address@hidden> writes:
> This allows to navigate partial well-known paths from an object.
Why does making the argument const allow such navigation?
> Signed-off-by: Andreas Färber <address@hidden>
> Cc: Anthony Liguori <address@hidden>
> ---
> 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) {
Unrelated: do we really want to go along with glib's basic type typedef
silliness?
- [Qemu-ppc] [RFC ppc-next v3 00/10] target-ppc: MacIO QOM'ification, Andreas Färber, 2013/01/13
- [Qemu-ppc] [RFC ppc-next v3 06/10] mac_nvram: Clean up public API, Andreas Färber, 2013/01/13
- [Qemu-ppc] [PATCH 01/10] qom: Make object_resolve_path_component() path argument const, Andreas Färber, 2013/01/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 01/10] qom: Make object_resolve_path_component() path argument const,
Markus Armbruster <=
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 01/10] qom: Make object_resolve_path_component() path argument const, Andreas Färber, 2013/01/14
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 01/10] qom: Make object_resolve_path_component() path argument const, Markus Armbruster, 2013/01/14
- [Qemu-ppc] Go along with glib's basic type typedef silliness? (was: [Qemu-devel] [PATCH 01/10] qom: Make object_resolve_path_component() path argument const), Markus Armbruster, 2013/01/14
- Re: [Qemu-ppc] [Qemu-devel] Go along with glib's basic type typedef silliness? (was: [PATCH 01/10] qom: Make object_resolve_path_component() path argument const), Blue Swirl, 2013/01/17
- Re: [Qemu-ppc] [Qemu-devel] Go along with glib's basic type typedef silliness?, Markus Armbruster, 2013/01/18
- Re: [Qemu-ppc] [Qemu-devel] Go along with glib's basic type typedef silliness?, Blue Swirl, 2013/01/19
[Qemu-ppc] [RFC ppc-next v3 04/10] macio: Delay qdev init until all fields are initialized, Andreas Färber, 2013/01/13
[Qemu-ppc] [RFC ppc-next v3 07/10] mac_nvram: Mark as Big Endian, Andreas Färber, 2013/01/13
[Qemu-ppc] [RFC ppc-next v3 08/10] mac_nvram: QOM'ify MacIO NVRAM, Andreas Färber, 2013/01/13