Searched hist:c6cd7e41 (Results 1 – 1 of 1) sorted by relevance
/openbmc/qemu/scripts/qapi/ |
H A D | commands.py | c6cd7e41 Mon Feb 01 13:37:44 CST 2021 Markus Armbruster <armbru@redhat.com> qapi/commands: Simplify command registry generation QAPISchemaGenCommandVisitor.visit_command() needs to generate the marshalling function into the current module, and also generate its registration into the ./init system module. The latter is done somewhat awkwardly: .__init__() creates a QAPIGenCCode that will not be written out, each .visit_command() adds its registration to it, and .visit_end() copies its contents into the ./init module it creates. Instead provide the means to temporarily switch to another module. Create the ./init module in .visit_begin(), and generate its initial part. Add registrations to it in .visit_command(). Finish it in .visit_end(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20210201193747.2169670-14-jsnow@redhat.com>
|