From: Markus Armbruster Date: Fri, 4 Nov 2022 16:07:03 +0000 (+0100) Subject: qapi replay: Elide redundant has_FOO in generated C X-Git-Tag: v8.0.0-rc0~130^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d01c00463fa70ff87ac40d5d3c39acd805488e69;p=thirdparty%2Fqemu.git qapi replay: Elide redundant has_FOO in generated C The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/replay.json. Said commit explains the transformation in more detail. The invariant violations mentioned there do not occur here. Cc: Pavel Dovgalyuk Cc: Paolo Bonzini Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221104160712.3005652-22-armbru@redhat.com> --- diff --git a/replay/replay-debugging.c b/replay/replay-debugging.c index 1cde50e9f37..3e60549a4ae 100644 --- a/replay/replay-debugging.c +++ b/replay/replay-debugging.c @@ -50,7 +50,6 @@ ReplayInfo *qmp_query_replay(Error **errp) retval->mode = replay_mode; if (replay_get_filename()) { retval->filename = g_strdup(replay_get_filename()); - retval->has_filename = true; } retval->icount = replay_get_current_icount(); return retval; diff --git a/scripts/qapi/schema.py b/scripts/qapi/schema.py index c74c26bda30..2b6644f1c3c 100644 --- a/scripts/qapi/schema.py +++ b/scripts/qapi/schema.py @@ -759,7 +759,6 @@ class QAPISchemaObjectTypeMember(QAPISchemaMember): assert self.type # Temporary hack to support dropping the has_FOO in reviewable chunks opt_out = [ - 'qapi/replay.json', 'qapi/rocker.json', 'qapi/run-state.json', 'qapi/stats.json',