[Xcb] [PATCH libxcb 1/3] generator: support fixed size lists in var-sized structs
Christian Linhart
chris at DemoRecorder.com
Fri Sep 5 08:18:31 PDT 2014
On 09/05/14 15:30, Ran Benita wrote:
> On Thu, Aug 21, 2014 at 10:35:54PM +0200, Christian Linhart wrote:
>> ---
>> src/c_client.py | 8 ++++++--
>> 1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/c_client.py b/src/c_client.py
>> index 87f268b..fa59fff 100644
>> --- a/src/c_client.py
>> +++ b/src/c_client.py
>> @@ -866,16 +866,20 @@ def _c_serialize_helper_fields_fixed_size(context, self, field,
>> for i in range(field.type.nmemb):
>> code_lines.append('%s %s[%d] = *(%s *)xcb_tmp;' %
>> (space, abs_field_name, i, field.c_field_type))
>> # total padding = sizeof(pad0) * nmemb
>> length += " * %d" % field.type.nmemb
>>
>> if field.type.is_list:
>
> Another small comment: maybe while you're here you can change this to
> `elif`.
Thank you for catching that.
It won't change the result of the program but make the code
more readable and a bit faster.
I'll save that in my style-TODO folder if that's OK for you.
Chris
P.S.: Thank you for your reviewing work!
I appreciate that.
Reviewing is important for software quality.
More information about the Xcb
mailing list