From: Christian Linhart Date: Wed, 3 Sep 2014 11:22:37 +0000 (+0200) Subject: generator: fix absname for fields with only iterator function X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bdf9001a1bbd018fd2d6ebca458d511eaded4e7b;p=free-sw%2Fxcb%2Flibxcb generator: fix absname for fields with only iterator function Fix _c_helper_absolute_name for fields which can only be accessed with an iterator function. These are lists with var-sized structs as members. Message-ID: <1409743361-466-2-git-send-email-chris@demorecorder.com> Patch-Thread-Subject: [Xcb] xinput: make ListInputDevices work, sumof with nested expr, ... Patch-Set: ListInputDevices Patch-Number: libxcb 2/6 Patch-Version: V1 Signed-off-by: Christian Linhart --- diff --git a/src/c_client.py b/src/c_client.py index d3f0eec..a5b3a2c 100644 --- a/src/c_client.py +++ b/src/c_client.py @@ -468,7 +468,12 @@ def _c_helper_absolute_name(prefix, field=None): ) ) ): - prefix_str = field.c_accessor_name + "(" + prefix_str_without_lastsep + ")"; + if field.type.is_list and not field.type.member.fixed_size(): + # only accessible by iterator + prefix_str = field.c_iterator_name + "(" + prefix_str_without_lastsep + ")"; + else: + # only accessible by access function + prefix_str = field.c_accessor_name + "(" + prefix_str_without_lastsep + ")"; return prefix_str # _c_absolute_name