]> Git Repo - qemu.git/commit - qapi/qobject-input-visitor.c
qapi: Generalize struct member policy checking
authorMarkus Armbruster <[email protected]>
Thu, 28 Oct 2021 10:25:16 +0000 (12:25 +0200)
committerMarkus Armbruster <[email protected]>
Fri, 29 Oct 2021 16:23:09 +0000 (18:23 +0200)
commita130728554d0cc19ef0ed4c1c824305c1682e64b
tree0922ae397f9bfdcb5a308b215b951a88177fad60
parentc67db1ed16ff5a7c1b186caa754e0c738aa945b8
qapi: Generalize struct member policy checking

The generated visitor functions call visit_deprecated_accept() and
visit_deprecated() when visiting a struct member with special feature
flag 'deprecated'.  This makes the feature flag visible to the actual
visitors.  I want to make feature flag 'unstable' visible there as
well, so I can add policy for it.

To let me make it visible, replace these functions by
visit_policy_reject() and visit_policy_skip(), which take the member's
special features as an argument.  Note that the new functions have the
opposite sense, i.e. the return value flips.

Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <20211028102520[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
[Unbreak forward visitor]
include/qapi/visitor-impl.h
include/qapi/visitor.h
qapi/qapi-forward-visitor.c
qapi/qapi-visit-core.c
qapi/qobject-input-visitor.c
qapi/qobject-output-visitor.c
qapi/trace-events
scripts/qapi/visit.py
This page took 0.028452 seconds and 4 git commands to generate.