Am 23.05.2012 17:44, schrieb Paolo Bonzini:
> Can be replaced everywhere with object_property_find.
> 
> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
[...]
> 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