generator: fix absname for fields with only accessor function
authorChristian Linhart <chris@demorecorder.com>
Wed, 3 Sep 2014 11:22:36 +0000 (13:22 +0200)
committerChristian Linhart <chris@demorecorder.com>
Tue, 9 Sep 2014 00:05:44 +0000 (02:05 +0200)
commitf62070938af6dd3d6c8cbca98fabc948034c1c5f
tree677a1cc9e2b117a21cde1d6bf5b539ba9c4883fe
parentf89c9126cf1e6b76527388a0d1f3e13abeb1b85b
generator: fix absname for fields with only accessor function

Fix _c_helper_absolute_name for fields which cannot be accessed
as a struct/union member but which can be accessed by an
accessor function.

The fix calls the accessor function in these cases.

Example:
<struct name="AbsnameTest">
   <field type="CARD32" name="len" />
   <list type="CARD8" name="mylist1">
       <fieldref>len</fieldref>
   </list>
   <list type="CARD8" name="mylist2">
       <sumof ref="mylist1"/>
   </list>
</struct>

The sumof-expression ( <sumof ref="mylist1"/> ) refers to mylist1
which is only acessible by an accessor function.

Previously, sumof was only used inside bitcases,
where such lists are accessible by members of the
deserialized parent struct.
(there is a difference between deserialization of switches
and structs.)

Message-ID: <1409743361-466-1-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] xinput: make ListInputDevices work, sumof with nested expr, ...
Patch-Set: ListInputDevices
Patch-Number: libxcb 1/6
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
src/c_client.py