05372f708a
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. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1443565276-4535-15-git-send-email-eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> |
||
---|---|---|
.. | ||
kvm | ||
qemu-guest-agent | ||
qemugdb | ||
qmp | ||
tracetool | ||
acpi_extract_preprocess.py | ||
acpi_extract.py | ||
analyse-9p-simpletrace.py | ||
analyze-migration.py | ||
check-qerror.sh | ||
checkpatch.pl | ||
cleanup-trace-events.pl | ||
cocci-macro-file.h | ||
coverity-model.c | ||
create_config | ||
disas-objdump.pl | ||
dump-guest-memory.py | ||
extract-vsssdk-headers | ||
feature_to_c.sh | ||
get_maintainer.pl | ||
gtester-cat | ||
hxtool | ||
make_device_config.sh | ||
make-release | ||
ordereddict.py | ||
qapi-commands.py | ||
qapi-event.py | ||
qapi-introspect.py | ||
qapi-types.py | ||
qapi-visit.py | ||
qapi.py | ||
qemu-binfmt-conf.sh | ||
qemu-gdb.py | ||
qtest.py | ||
refresh-pxe-roms.sh | ||
shaderinclude.pl | ||
signrom.py | ||
simpletrace.py | ||
switch-timer-api | ||
texi2pod.pl | ||
tracetool.py | ||
update-acpi.sh | ||
update-linux-headers.sh | ||
vmstate-static-checker.py |