summaryrefslogtreecommitdiffstats
path: root/qapi/qobject-output-visitor.c
diff options
context:
space:
mode:
authorMarkus Armbruster2021-10-25 06:24:03 +0200
committerMarkus Armbruster2021-10-27 17:19:15 +0200
commited29bb28f8b0b17e965efcc2535fc32e101e3ceb (patch)
tree1bfd2967f141c4d71fc7bb08f71481b25cc1d6b9 /qapi/qobject-output-visitor.c
parentqapi: Add feature flags to enum members (diff)
downloadqemu-ed29bb28f8b0b17e965efcc2535fc32e101e3ceb.tar.gz
qemu-ed29bb28f8b0b17e965efcc2535fc32e101e3ceb.tar.xz
qemu-ed29bb28f8b0b17e965efcc2535fc32e101e3ceb.zip
qapi: Move compat policy from QObject to generic visitor
The next commit needs to access compat policy from the generic visitor core. Move it there from qobject input and output visitor. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20211025042405.3762351-4-armbru@redhat.com>
Diffstat (limited to 'qapi/qobject-output-visitor.c')
-rw-r--r--qapi/qobject-output-visitor.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/qapi/qobject-output-visitor.c b/qapi/qobject-output-visitor.c
index e4873308d4..9b7f510036 100644
--- a/qapi/qobject-output-visitor.c
+++ b/qapi/qobject-output-visitor.c
@@ -13,7 +13,6 @@
*/
#include "qemu/osdep.h"
-#include "qapi/compat-policy.h"
#include "qapi/qobject-output-visitor.h"
#include "qapi/visitor-impl.h"
#include "qemu/queue.h"
@@ -32,7 +31,6 @@ typedef struct QStackEntry {
struct QObjectOutputVisitor {
Visitor visitor;
- CompatPolicyOutput deprecated_policy;
QSLIST_HEAD(, QStackEntry) stack; /* Stack of unfinished containers */
QObject *root; /* Root of the output visit */
@@ -212,9 +210,7 @@ static bool qobject_output_type_null(Visitor *v, const char *name,
static bool qobject_output_deprecated(Visitor *v, const char *name)
{
- QObjectOutputVisitor *qov = to_qov(v);
-
- return qov->deprecated_policy != COMPAT_POLICY_OUTPUT_HIDE;
+ return v->compat_policy.deprecated_output != COMPAT_POLICY_OUTPUT_HIDE;
}
/* Finish building, and return the root object.
@@ -275,11 +271,3 @@ Visitor *qobject_output_visitor_new(QObject **result)
return &v->visitor;
}
-
-void qobject_output_visitor_set_policy(Visitor *v,
- CompatPolicyOutput deprecated)
-{
- QObjectOutputVisitor *qov = to_qov(v);
-
- qov->deprecated_policy = deprecated;
-}