diff mbox series

[PULL,19/28] qapi replay: Elide redundant has_FOO in generated C

Message ID 20221025080541.271547-20-armbru@redhat.com
State New
Headers show
Series [PULL,01/28] docs/devel/qapi-code-gen: Update example to match current code | expand

Commit Message

Markus Armbruster Oct. 25, 2022, 8:05 a.m. UTC
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 <pavel.dovgaluk@ispras.ru>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221018062849.3420573-20-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 replay/replay-debugging.c | 1 -
 scripts/qapi/schema.py    | 1 -
 2 files changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/replay/replay-debugging.c b/replay/replay-debugging.c
index 1cde50e9f3..3e60549a4a 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 c74c26bda3..2b6644f1c3 100644
--- a/scripts/qapi/schema.py
+++ b/scripts/qapi/schema.py
@@ -759,7 +759,6 @@  def need_has(self):
         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',