qapi/gen: Combine ._add_[user|system]_module

With callers to _add_system_module now explicitly using the './' prefix
to indicate a system module, there is no longer any reason to have
separate interfaces for adding system vs user modules; use a unified
interface that differentiates based on the name.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210201193747.2169670-10-jsnow@redhat.com>
This commit is contained in:
Markus Armbruster 2021-02-01 14:37:40 -05:00
parent e2bbc4eaa7
commit 4ab0ff6da0
3 changed files with 7 additions and 14 deletions

View file

@ -286,7 +286,7 @@ class QAPISchemaGenCommandVisitor(QAPISchemaModularCVisitor):
types=types))
def visit_end(self) -> None:
self._add_system_module('./init', ' * QAPI Commands initialization')
self._add_module('./init', ' * QAPI Commands initialization')
self._genh.add(mcgen('''
#include "qapi/qmp/dispatch.h"