dcac64711e
We neglect to call .visit_module() for the special module we use for built-ins. Harmless, but clean it up anyway. The tests/qapi-schema/*.out now show the built-in module as 'module None'. Subclasses of QAPISchemaModularCVisitor need to ._add_module() this special module to enable code generation for built-ins. When this hasn't been done, QAPISchemaModularCVisitor.visit_module() does nothing for the special module. That looks like built-ins could accidentally be generated into the wrong module when a subclass neglects to call ._add_module(). Can't happen, because built-ins are all visited before any other module. But that's non-obvious. Switch off code generation explicitly. Rename QAPISchemaModularCVisitor._begin_module() to ._begin_user_module(). New QAPISchemaModularCVisitor._is_builtin_module(), for clarity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190214152251.2073-4-armbru@redhat.com>
26 lines
506 B
Plaintext
26 lines
506 B
Plaintext
module None
|
|
object q_empty
|
|
enum QType
|
|
prefix QTYPE
|
|
member none
|
|
member qnull
|
|
member qnum
|
|
member qstring
|
|
member qdict
|
|
member qlist
|
|
member qbool
|
|
module include-repetition.json
|
|
include comments.json
|
|
module comments.json
|
|
enum Status
|
|
member good
|
|
member bad
|
|
member ugly
|
|
module include-repetition.json
|
|
include include-repetition-sub.json
|
|
module include-repetition-sub.json
|
|
include comments.json
|
|
include comments.json
|
|
module include-repetition.json
|
|
include comments.json
|