Paolo Bonzini <pbonz...@redhat.com> writes:

> Il 18/04/2014 23:56, Amos Kong ha scritto:
>> Currently we always add a space after c_type in mcgen(), there is
>> some redundant space in generated code. The space isn't needed for
>> points by the coding style.
>>
>>   char * value;
>>         ^
>>   qapi_free_NameInfo(NameInfo * obj)
>>                                ^
>> It's fussy to add checking in each mcgen(), this patch just addes
>> the necessary space in c_type(), and remove original space in mcgen().
>
> It also makes the generator harder to read to though, and the
> improvement in the generated code is minor enough that I think the
> change is overall negative.  But I won't oppose the patch if the
> maintainers are fine with it.

The readability hit could be avoided: instead of moving the space from
mcgen()'s argument to c_type()'s result, add a "hungry character" to
c_type()'s result, then make it eat space to the right in mcgen().

Reply via email to