qapi: Drop dead genlist parameter

Defaulting a parameter to True, then having all callers omit or
pass an explicit True for that parameter, is pointless. Looks
like it has been dead since introduction in commit 06d64c6, more
than 4 years ago.

Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
Eric Blake 2015-04-10 15:07:59 -06:00 committed by Luiz Capitulino
parent 46abb81240
commit 6540e9f35b

View File

@ -2,7 +2,7 @@
# QAPI visitor generator # QAPI visitor generator
# #
# Copyright IBM, Corp. 2011 # Copyright IBM, Corp. 2011
# Copyright (C) 2014 Red Hat, Inc. # Copyright (C) 2014-2015 Red Hat, Inc.
# #
# Authors: # Authors:
# Anthony Liguori <aliguori@us.ibm.com> # Anthony Liguori <aliguori@us.ibm.com>
@ -401,7 +401,7 @@ out:
return ret return ret
def generate_declaration(name, members, genlist=True, builtin_type=False): def generate_declaration(name, members, builtin_type=False):
ret = "" ret = ""
if not builtin_type: if not builtin_type:
ret += mcgen(''' ret += mcgen('''
@ -410,7 +410,6 @@ void visit_type_%(name)s(Visitor *m, %(name)s **obj, const char *name, Error **e
''', ''',
name=name) name=name)
if genlist:
ret += mcgen(''' ret += mcgen('''
void visit_type_%(name)sList(Visitor *m, %(name)sList **obj, const char *name, Error **errp); void visit_type_%(name)sList(Visitor *m, %(name)sList **obj, const char *name, Error **errp);
''', ''',
@ -418,17 +417,15 @@ void visit_type_%(name)sList(Visitor *m, %(name)sList **obj, const char *name, E
return ret return ret
def generate_enum_declaration(name, members, genlist=True): def generate_enum_declaration(name, members):
ret = "" ret = mcgen('''
if genlist:
ret += mcgen('''
void visit_type_%(name)sList(Visitor *m, %(name)sList **obj, const char *name, Error **errp); void visit_type_%(name)sList(Visitor *m, %(name)sList **obj, const char *name, Error **errp);
''', ''',
name=name) name=name)
return ret return ret
def generate_decl_enum(name, members, genlist=True): def generate_decl_enum(name, members):
return mcgen(''' return mcgen('''
void visit_type_%(name)s(Visitor *m, %(name)s *obj, const char *name, Error **errp); void visit_type_%(name)s(Visitor *m, %(name)s *obj, const char *name, Error **errp);
@ -542,8 +539,7 @@ exprs = parse_schema(input_file)
# for built-in types in our header files and simply guard them # for built-in types in our header files and simply guard them
fdecl.write(guardstart("QAPI_VISIT_BUILTIN_VISITOR_DECL")) fdecl.write(guardstart("QAPI_VISIT_BUILTIN_VISITOR_DECL"))
for typename in builtin_types: for typename in builtin_types:
fdecl.write(generate_declaration(typename, None, genlist=True, fdecl.write(generate_declaration(typename, None, builtin_type=True))
builtin_type=True))
fdecl.write(guardend("QAPI_VISIT_BUILTIN_VISITOR_DECL")) fdecl.write(guardend("QAPI_VISIT_BUILTIN_VISITOR_DECL"))
# ...this doesn't work for cases where we link in multiple objects that # ...this doesn't work for cases where we link in multiple objects that