qemu-e2k/scripts/qapi
Markus Armbruster 56a4689582 qapi: Fix array first used in a different module
We generally put implicitly defined types in whatever module triggered
their definition.  This is wrong for array types, as the included test
case demonstrates.  Let's have a closer look at it.

Type 'Status' is defined sub-sub-module.json.  Array type ['Status']
occurs in main module qapi-schema-test.json and in
include/sub-module.json.  The main module's use is first, so the array
type gets put into the main module.

The generated C headers define StatusList in qapi-types.h.  But
include/qapi-types-sub-module.h uses it without including
qapi-types.h.  Oops.

To fix that, put the array type into its element type's module.

Now StatusList gets generated into qapi-types-sub-module.h, which all
its users include.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190301154051.23317-8-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2019-03-05 14:43:11 +01:00
..
__init__.py qapi-gen: New common driver for code and doc generators 2018-03-02 13:14:09 -06:00
commands.py qapi: Pass file name to QAPIGen constructor instead of methods 2019-03-05 14:43:11 +01:00
common.py qapi: Fix array first used in a different module 2019-03-05 14:43:11 +01:00
doc.py qapi: Pass file name to QAPIGen constructor instead of methods 2019-03-05 14:43:11 +01:00
events.py Revert "qapi-events: add 'if' condition to implicit event enum" 2019-02-18 14:44:05 +01:00
introspect.py qapi: Add #if conditions to generated code members 2018-12-14 06:52:48 +01:00
types.py qapi: Prepare for system modules other than 'builtin' 2019-02-18 14:44:04 +01:00
visit.py qapi: Prepare for system modules other than 'builtin' 2019-02-18 14:44:04 +01:00