[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] qapi: add struct strList and visit_type_strL
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v2] qapi: add struct strList and visit_type_strList() |
Date: |
Wed, 24 Apr 2013 18:11:55 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 |
Il 24/04/2013 18:08, Amos Kong ha scritto:
> diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py
> index 9e19920..e449a14 100644
> --- a/scripts/qapi-types.py
> +++ b/scripts/qapi-types.py
> @@ -276,6 +276,7 @@ fdecl.write(mcgen('''
> #include <stdbool.h>
> #include <stdint.h>
>
> +struct strList;
> ''',
> guard=guardname(h_file)))
>
> diff --git a/scripts/qapi.py b/scripts/qapi.py
> index afc5f32..14f9f4d 100644
> --- a/scripts/qapi.py
> +++ b/scripts/qapi.py
> @@ -166,11 +166,11 @@ def c_fun(name, protect=True):
> return c_var(name, protect).replace('.', '_')
>
> def c_list_type(name):
> - return '%sList' % name
> + return 'struct %sList' % name
>
> def type_name(name):
> if type(name) == list:
> - return c_list_type(name[0])
> + return '%sList' % name[0]
> return name
This second change is needed to generate the correct function names,
right? If so,
Reviewed-by: Paolo Bonzini <address@hidden>
Paolo
- Re: [Qemu-devel] [qapi] Cannot use list of strings, (continued)
- Re: [Qemu-devel] [qapi] Cannot use list of strings, Lluís Vilanova, 2013/04/15
- Re: [Qemu-devel] [qapi] Cannot use list of strings, Stefan Hajnoczi, 2013/04/16
- Re: [Qemu-devel] [qapi] Cannot use list of strings, mdroth, 2013/04/16
- Re: [Qemu-devel] [PATCH v2] qapi: add struct strList and visit_type_strList(), mdroth, 2013/04/24
- Re: [Qemu-devel] [PATCH v2] qapi: add struct strList and visit_type_strList(), Amos Kong, 2013/04/26