qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/3] qom: Simplify and merge pointer property getters/setters


From: Eric Blake
Subject: Re: [PATCH 3/3] qom: Simplify and merge pointer property getters/setters
Date: Fri, 9 Oct 2020 15:02:58 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

On 10/9/20 2:15 PM, Eduardo Habkost wrote:
> Both the property getter and setter for pointer properties can
> simply call the visitor functions directly, instead of making
> extra copies and requiring additional logic.
> 
> Remove the extra copying logic, and merge the getter and setter
> functions in object_visit_uint*_ptr() accessors.
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  qom/object.c | 114 ++++++++++-----------------------------------------
>  1 file changed, 22 insertions(+), 92 deletions(-)
> 
> diff --git a/qom/object.c b/qom/object.c
> index 6b4dfc279a..3b343fd118 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -2496,119 +2496,57 @@ static void *pointer_property_get_ptr(Object *obj, 
> PointerProperty *prop)
>      }
>  }
>  
> -static void property_get_uint8_ptr(Object *obj, Visitor *v, const char *name,
> +static void property_visit_uint8_ptr(Object *obj, Visitor *v, const char 
> *name,
>                                     void *opaque, Error **errp)

Indentation is now off.  Several instances.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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