[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 09/16] qapi: Make c_type() consistently conve
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v4 09/16] qapi: Make c_type() consistently convert qapi names |
Date: |
Thu, 14 May 2015 17:40:09 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Eric Blake <address@hidden> writes:
> Continuing the string of cleanups for supporting downstream names
> containing '.', this patch focuses on ensuring c_type() can
> handle a downstream name. This patch alone does not fix the
> places where generator output should be calling this function
> but was open-coding things instead, but it gets us a step closer.
>
> In particular, the changes to c_list_type() and type_name() mean
> that type_name(FOO) now handles the case when FOO contains '.',
> '-', or is a ticklish identifier other than a builtin (builtins
> are exempted because ['int'] must remain mapped to 'intList' and
> not 'q_intList'). Meanwhile, ['unix'] now maps to 'q_unixList'
> rather than 'unixList', to match the fact that 'unix' is ticklish;
> however, our naming conventions state that complex types should
> start with a capital, so no type name following conventions will
> ever have the 'q_' prepended.
>
> Likewise, changes to c_type() mean that c_type(FOO) properly
> handles an enum or complex type FOO with '.' or '-' in the
> name, or is a ticklish identifier (again, a ticklish identifier
> as a type name violates conventions).
>
> Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
- [Qemu-devel] [PATCH v4 11/16] qapi: Support downstream structs, (continued)
- [Qemu-devel] [PATCH v4 11/16] qapi: Support downstream structs, Eric Blake, 2015/05/14
- [Qemu-devel] [PATCH v4 15/16] qapi: Support downstream events and commands, Eric Blake, 2015/05/14
- [Qemu-devel] [PATCH v4 16/16] qapi: Prefer '"str" + var' over '"str%s" % var', Eric Blake, 2015/05/14
- [Qemu-devel] [PATCH v4 13/16] qapi: Support downstream flat unions, Eric Blake, 2015/05/14
- [Qemu-devel] [PATCH v4 03/16] qapi: Rename _generate_enum_string() to camel_to_upper(), Eric Blake, 2015/05/14
- [Qemu-devel] [PATCH v4 04/16] qapi: Rename generate_enum_full_value() to c_enum_const(), Eric Blake, 2015/05/14
- [Qemu-devel] [PATCH v4 01/16] qapi: Fix C identifiers generated for names containing '.', Eric Blake, 2015/05/14
- [Qemu-devel] [PATCH v4 09/16] qapi: Make c_type() consistently convert qapi names, Eric Blake, 2015/05/14
- Re: [Qemu-devel] [PATCH v4 09/16] qapi: Make c_type() consistently convert qapi names,
Markus Armbruster <=
- [Qemu-devel] [PATCH v4 08/16] qapi: Tidy c_type logic, Eric Blake, 2015/05/14
- [Qemu-devel] [PATCH v4 06/16] qapi: Use c_enum_const() in generate_alternate_qtypes(), Eric Blake, 2015/05/14
- [Qemu-devel] [PATCH v4 07/16] qapi: Move camel_to_upper(), c_enum_const() to closely related code, Eric Blake, 2015/05/14
- Re: [Qemu-devel] [PATCH v4 00/16] Fix qapi mangling of downstream names, Eric Blake, 2015/05/14