qapi: generate a literal qobject for introspection

Replace the generated json string with a literal qobject. The later is
easier to deal with, at run time as well as compile time: adding #if
conditionals will be easier than in a json string.

The output of query-qmp-schema is not changed.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180305172951.2150-5-marcandre.lureau@redhat.com>
[eblake: fix python 3 failure]
Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Marc-André Lureau 2018-03-05 18:29:51 +01:00 committed by Eric Blake
parent 3cf42b8b3a
commit 7d0f982bfb
4 changed files with 70 additions and 48 deletions

View file

@ -956,7 +956,7 @@ EventInfoList *qmp_query_events(Error **errp)
static void qmp_query_qmp_schema(QDict *qdict, QObject **ret_data,
Error **errp)
{
*ret_data = qobject_from_json(qmp_schema_json, &error_abort);
*ret_data = qobject_from_qlit(&qmp_schema_qlit);
}
/*