qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 02/10] qdev: remove qdev_prop_exists


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 02/10] qdev: remove qdev_prop_exists
Date: Thu, 24 May 2012 23:34:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120421 Thunderbird/12.0

Am 23.05.2012 17:44, schrieb Paolo Bonzini:
> Can be replaced everywhere with object_property_find.
> 
> Signed-off-by: Paolo Bonzini <address@hidden>
[...]
> diff --git a/include/qemu/object.h b/include/qemu/object.h
> index 5fd2270..b7efc63 100644
> --- a/include/qemu/object.h
> +++ b/include/qemu/object.h
> @@ -636,6 +636,15 @@ void object_property_add(Object *obj, const char *name, 
> const char *type,
>  
>  void object_property_del(Object *obj, const char *name, struct Error **errp);
>  
> +/**
> + * object_property_find:
> + * @obj: the object
> + * @name: the name of the property
> + *
> + * Look up a property for an object and return its #ObjectProperty if found.
> + */
> +ObjectProperty *object_property_find(Object *obj, const char *name);
> +
>  void object_unparent(Object *obj);
>  
>  /**
> diff --git a/qom/object.c b/qom/object.c
> index 4b410f1..13fd157 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -662,7 +662,7 @@ void object_property_add(Object *obj, const char *name, 
> const char *type,
>      QTAILQ_INSERT_TAIL(&obj->properties, prop, node);
>  }
>  
> -static ObjectProperty *object_property_find(Object *obj, const char *name)
> +ObjectProperty *object_property_find(Object *obj, const char *name)
>  {
>      ObjectProperty *prop;
>  

Any reason not to expose a bool object_property_exists() instead? Is the
ObjectProperty actually used somewhere?

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]