aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi/gen.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/qapi/gen.py')
-rw-r--r--scripts/qapi/gen.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py
index 113b49134d..b5a8d03e8e 100644
--- a/scripts/qapi/gen.py
+++ b/scripts/qapi/gen.py
@@ -121,7 +121,7 @@ def build_params(arg_type: Optional[QAPISchemaObjectType],
for memb in arg_type.members:
ret += sep
sep = ', '
- if memb.optional:
+ if memb.need_has():
ret += 'bool has_%s, ' % c_name(memb.name)
ret += '%s %s' % (memb.type.c_param_type(),
c_name(memb.name))