Eric Blake <[email protected]> writes:

> On 08/04/2015 03:08 AM, Markus Armbruster wrote:
>> Markus Armbruster <[email protected]> writes:
>> 
>>> Eric Blake <[email protected]> writes:
>>>
>>>> On 07/01/2015 02:22 PM, Markus Armbruster wrote:
>> [...]
>>>>> @@ -105,7 +103,8 @@ struct %(name)s
>>>>>  
>>>>>  def generate_enum_lookup(name, values):
>>>>>      ret = mcgen('''
>>>>> -const char * const %(name)s_lookup[] = {
>>>>> +
>>>>> +const char *const %(name)s_lookup[] = {
>>>>
>>>> [2] generated diffs like this:
>>>>
>>>> qapi-types.c:
>>>> -const char * const OnOffAuto_lookup[] = {
>>>> +const char *const OnOffAuto_lookup[] = {
>>>>
>>>> Hmm - we already failed to update docs/qapi-code-gen.txt in the past; we
>>>> added a const in commit 2e4450ff that is missing from the documentation.
>>>
>>> Minor review fail.  Not the first time.
>> 
>> I take that back, it's actually not visible in qapi-code-gen.txt.
>
> Oh, you're right - the only mention of *_lookup[] in the docs file is
> the array generated for all events, and that one was output with correct
> spacing (until the rest of your series fixes it to share code rather
> than duplicate things with slight differences).
>
> Maybe we SHOULD be showing what the generators do for enums, unions, and
> alternates (by expanding the example-schema.json that is then fed to all
> the example script usage). But that's fine as a project for another day.

The place where we try to exercise all the schema features is
qapi-schema-test.json.

Reply via email to