diff options
author | Markus Armbruster <armbru@redhat.com> | 2021-10-25 06:24:03 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2021-10-27 17:19:15 +0200 |
commit | ed29bb28f8b0b17e965efcc2535fc32e101e3ceb (patch) | |
tree | 1bfd2967f141c4d71fc7bb08f71481b25cc1d6b9 /qapi/qobject-input-visitor.c | |
parent | b6c18755e41f7b40aad4c2c8188fb1719535699d (diff) |
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-input-visitor.c')
-rw-r--r-- | qapi/qobject-input-visitor.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/qapi/qobject-input-visitor.c b/qapi/qobject-input-visitor.c index 04b790412e..71b24a4429 100644 --- a/qapi/qobject-input-visitor.c +++ b/qapi/qobject-input-visitor.c @@ -14,7 +14,6 @@ #include "qemu/osdep.h" #include <math.h> -#include "qapi/compat-policy.h" #include "qapi/error.h" #include "qapi/qobject-input-visitor.h" #include "qapi/visitor-impl.h" @@ -44,7 +43,6 @@ typedef struct StackObject { struct QObjectInputVisitor { Visitor visitor; - CompatPolicyInput deprecated_policy; /* Root of visit at visitor creation. */ QObject *root; @@ -667,9 +665,7 @@ static void qobject_input_optional(Visitor *v, const char *name, bool *present) static bool qobject_input_deprecated_accept(Visitor *v, const char *name, Error **errp) { - QObjectInputVisitor *qiv = to_qiv(v); - - switch (qiv->deprecated_policy) { + switch (v->compat_policy.deprecated_input) { case COMPAT_POLICY_INPUT_ACCEPT: return true; case COMPAT_POLICY_INPUT_REJECT: @@ -739,14 +735,6 @@ Visitor *qobject_input_visitor_new(QObject *obj) return &v->visitor; } -void qobject_input_visitor_set_policy(Visitor *v, - CompatPolicyInput deprecated) -{ - QObjectInputVisitor *qiv = to_qiv(v); - - qiv->deprecated_policy = deprecated; -} - Visitor *qobject_input_visitor_new_keyval(QObject *obj) { QObjectInputVisitor *v = qobject_input_visitor_base_new(obj); |