aboutsummaryrefslogtreecommitdiff
path: root/qapi/qobject-output-visitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'qapi/qobject-output-visitor.c')
-rw-r--r--qapi/qobject-output-visitor.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/qapi/qobject-output-visitor.c b/qapi/qobject-output-visitor.c
index b155bf4149..74770edd73 100644
--- a/qapi/qobject-output-visitor.c
+++ b/qapi/qobject-output-visitor.c
@@ -212,8 +212,12 @@ static bool qobject_output_type_null(Visitor *v, const char *name,
static bool qobject_output_policy_skip(Visitor *v, const char *name,
unsigned special_features)
{
- return !(special_features & 1u << QAPI_DEPRECATED)
- || v->compat_policy.deprecated_output == COMPAT_POLICY_OUTPUT_HIDE;
+ CompatPolicy *pol = &v->compat_policy;
+
+ return ((special_features & 1u << QAPI_DEPRECATED)
+ && pol->deprecated_output == COMPAT_POLICY_OUTPUT_HIDE)
+ || ((special_features & 1u << QAPI_UNSTABLE)
+ && pol->unstable_output == COMPAT_POLICY_OUTPUT_HIDE);
}
/* Finish building, and return the root object.