diff options
author | Markus Armbruster | 2015-06-12 09:22:32 +0200 |
---|---|---|
committer | Markus Armbruster | 2015-06-18 14:19:48 +0200 |
commit | c5ecd7e18f912ab5e91f09b0333fb07567885d42 (patch) | |
tree | b5f56760be8a51c8e5da58d87c0573f7a3a4e062 /scripts | |
parent | qapi-types: Drop unused members parameters (diff) | |
download | qemu-c5ecd7e18f912ab5e91f09b0333fb07567885d42.tar.gz qemu-c5ecd7e18f912ab5e91f09b0333fb07567885d42.tar.xz qemu-c5ecd7e18f912ab5e91f09b0333fb07567885d42.zip |
qapi-types: Split generate_fwd_builtin() off generate_fwd_struct()
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/qapi-types.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py index c408542d46..12fb2eff04 100644 --- a/scripts/qapi-types.py +++ b/scripts/qapi-types.py @@ -12,9 +12,8 @@ from ordereddict import OrderedDict from qapi import * -def generate_fwd_struct(name, builtin_type=False): - if builtin_type: - return mcgen(''' +def generate_fwd_builtin(name): + return mcgen(''' typedef struct %(name)sList { @@ -25,9 +24,10 @@ typedef struct %(name)sList struct %(name)sList *next; } %(name)sList; ''', - type=c_type(name), - name=name) + type=c_type(name), + name=name) +def generate_fwd_struct(name): return mcgen(''' typedef struct %(name)s %(name)s; @@ -332,7 +332,7 @@ exprs = parse_schema(input_file) fdecl.write(guardstart("QAPI_TYPES_BUILTIN_STRUCT_DECL")) for typename in builtin_types.keys(): - fdecl.write(generate_fwd_struct(typename, builtin_type=True)) + fdecl.write(generate_fwd_builtin(typename)) fdecl.write(guardend("QAPI_TYPES_BUILTIN_STRUCT_DECL")) for expr in exprs: |