On Mon, Dec 15, 2025 at 07:00:02PM -0300, Fabiano Rosas wrote:
> The migration subsystem currently has code to merge two objects of the
> same type. It does so by checking which fields are present in a source
> object and overwriting the corresponding fields on the destination
> object. This leads to a lot of open-coded lines such as:
>
> if (src->has_foobar) {
> dst->foobar = src->foobar;
> }
>
> This pattern could be replaced by a copy using visitors. Implement a
> macro that extracts elements from a source object using an output
> visitor and merges it with a destination object using an input
> visitor.
>
> Signed-off-by: Fabiano Rosas <[email protected]>
Let's see how QAPI maintainers think.. Looks good here:
Acked-by: Peter Xu <[email protected]>
--
Peter Xu