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