Re: [Qemu-devel] [PATCH v4 13/28] qapi: Add new clone visitor

2016-06-08 Thread Eric Blake
On 06/02/2016 07:43 AM, Markus Armbruster wrote: > Eric Blake writes: > >> We have a couple places in the code base that want to deep-clone >> one QAPI object into another, and they were resorting to serializing >> the struct out to QObject then reparsing it. A much more efficient >> version can

Re: [Qemu-devel] [PATCH v4 13/28] qapi: Add new clone visitor

2016-06-03 Thread Markus Armbruster
Markus Armbruster writes: > Eric Blake writes: [...] >> diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c >> index 279ea8e..c5bdca2 100644 >> --- a/qapi/qapi-visit-core.c >> +++ b/qapi/qapi-visit-core.c [...] >> @@ -44,10 +44,10 @@ void visit_start_struct(Visitor *v, const char *name,

Re: [Qemu-devel] [PATCH v4 13/28] qapi: Add new clone visitor

2016-06-02 Thread Markus Armbruster
Eric Blake writes: > We have a couple places in the code base that want to deep-clone > one QAPI object into another, and they were resorting to serializing > the struct out to QObject then reparsing it. A much more efficient > version can be done by adding a new clone visitor. > > Since cloning

[Qemu-devel] [PATCH v4 13/28] qapi: Add new clone visitor

2016-05-18 Thread Eric Blake
We have a couple places in the code base that want to deep-clone one QAPI object into another, and they were resorting to serializing the struct out to QObject then reparsing it. A much more efficient version can be done by adding a new clone visitor. Since cloning is still relatively uncommon, e