unicorn/qemu/scripts
Eric Blake 13b3a6c92f
qapi: Consistent generated code: minimize push_indent() usage
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.
This is one patch of a series to clean up these differences.

This patch reduces the number of push_indent()/pop_indent() pairs
so that generated code is typically already at its natural output
indentation in the python files. It is easier to reason about
generated code if the reader does not have to track how much
spacing will be inserted alongside the code, and moreso when all
of the generators use the same patterns (qapi-type and qapi-event
were already using in-place indentation).

Arguably, the resulting python may be a bit harder to read with C
code at the same indentation as python; on the other hand, not
having to think about push_indent() is a win, and most decent
editors provide syntax highlighting that makes it easier to
visually distinguish python code from string literals that will
become C code.

There is no change to the generated output.

Backports commit 05372f708a8cb3556e4d67458de79417dadf241f from qemu
2018-02-19 18:38:48 -05:00
..
create_config more cleanup qemu/configure 2017-01-19 14:11:54 +08:00
make_device_config.sh fix file perms 2015-08-28 21:05:38 -07:00
ordereddict.py
qapi-event.py qapi: Consistent generated code: minimize push_indent() usage 2018-02-19 18:38:48 -05:00
qapi-types.py qapi: Consistent generated code: prefer visitor 'v' 2018-02-19 18:21:53 -05:00
qapi-visit.py qapi: Consistent generated code: minimize push_indent() usage 2018-02-19 18:38:48 -05:00
qapi.py qapi: Consistent generated code: minimize push_indent() usage 2018-02-19 18:38:48 -05:00