qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 09/46] qapi: Use consistent generated code pa


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v5 09/46] qapi: Use consistent generated code patterns
Date: Fri, 25 Sep 2015 18:54:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Eric Blake <address@hidden> writes:

> We had some pointless differences in the generated code for visit,
> command marshalling, and events; unifying them makes it easier for
> future patches to consolidate to common helper functions.
> - Consistently name the error variable 'err'

Before the patch, qapi-event.py consistently uses local_err, and
qapi-commands.py uses both names.  I like your change.

> - Consistently use the labels 'out' and 'out_obj'

Before, qapi-event.py consistently uses 'clean', and qapi-visit.py uses
both 'out_obj' and 'out_end'.  Good change.

> - If allocation fails, jump to the right label rather than
> indenting everything else

Good idea.  Just one instance, in gen_visit_union().

Not mentioned: name the Visitor * parameter 'v' instead of 'm'.  No idea
where that 'm' comes from, but it has spilled over into qom/object.c and
qom/qom-object.c.  Let's ignore that for now.

> No change in semantics to the generated code.

Yes, but you need to update docs/qapi-code-gen.txt.

Pretty mechanical changes.  They look good to me, but as always, this
kind is easier to review when you do exactly one mechanical change per
patch.



reply via email to

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