On 09/25/2015 10:54 AM, Markus Armbruster wrote:
> Eric Blake <ebl...@redhat.com> 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'.

Whoops - I merged several patches from v4 into just this one for v5, but
forgot to update the commit message to match.

>  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.

I didn't even notice that.

> 
>> No change in semantics to the generated code.
> 
> Yes, but you need to update docs/qapi-code-gen.txt.

Indeed.

> 
> 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.

Sounds like my merge was premature; I'll split this back out into
separate patches, and update the docs to match (where things are
affected - our docs don't give any examples of the C code for visiting a
union).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to