qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 02/16] sockets: move qapi_copy_SocketAddress


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2 02/16] sockets: move qapi_copy_SocketAddress into qemu-sockets.c
Date: Tue, 20 Oct 2015 14:08:09 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0


On 20/10/2015 00:05, Eric Blake wrote:
> > -    qiv = qmp_input_visitor_new(obj);
> > -    iv = qmp_input_get_visitor(qiv);
> > -    visit_type_SocketAddress(iv, p_dest, NULL, &error_abort);
> > -    qmp_input_visitor_cleanup(qiv);
> > -    qobject_decref(obj);
> Interesting approach - it means that this copy will work no matter what
> further extensions we add into the qapi type.  But rather heavyweight
> compared to just doing a memberwise copy, no?  At any rate, this commit
> is straight code motion, so you did it correctly, but we may want to
> simplify things in a later commit.

A memberwise copy requires you to allocate embedded objects (I'm not
sure whether your boxing changes can simplify this).

Paolo



reply via email to

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