diff options
Diffstat (limited to 'scripts/qapi-commands.py')
-rw-r--r-- | scripts/qapi-commands.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py index 1399826cca..341dba27a8 100644 --- a/scripts/qapi-commands.py +++ b/scripts/qapi-commands.py @@ -131,7 +131,7 @@ v = qmp_input_get_visitor(mi); for argname, argtype, optional, structured in parse_args(args): if optional: ret += mcgen(''' -visit_start_optional(v, &has_%(c_name)s, "%(name)s", %(errp)s); +visit_optional(v, &has_%(c_name)s, "%(name)s", %(errp)s); if (has_%(c_name)s) { ''', c_name=c_var(argname), name=argname, errp=errparg) @@ -145,8 +145,7 @@ if (has_%(c_name)s) { pop_indent() ret += mcgen(''' } -visit_end_optional(v, %(errp)s); -''', errp=errparg) +''') if dealloc: ret += mcgen(''' |