summaryrefslogtreecommitdiff
path: root/xcb-xv.pc.in
diff options
context:
space:
mode:
authorChristian Linhart <chris@DemoRecorder.com>2014-11-02 13:45:12 +0100
committerChristian Linhart <chris@demorecorder.com>2014-11-03 11:23:16 +0100
commit265d38882cffce597367cc8bb2160b9e2482a80f (patch)
treeab98fec2079940108973cf92f6c9627a004caff3 /xcb-xv.pc.in
parentfdb291b414a7afc2c2326124b8ca11d6846cd7b9 (diff)
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 generates calls to 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.) V2 of this patch: * replaced "!= None" with "is not None" because that's more pythonic. (according to suggestion from Ran Benita) V3 of this patch: simplification: * fixed the recursion in _c_type_setup so that _c_helper_absolute_name does not need check a gazillion things as a workaround anymore. * simplified _c_helper_absolute_name - remove unneeded check for empty string before append of last_sep to prefix_str - removed those if-conditions which are not needed anymore after fixing the recursion in _c_type_setup. - extract functionality for checking whether a field needs an accessor ( and which type of accessor ) in functions. (also extracted from _c_accessors) - rearrange the condition branches and actions for more readability. V3 generates exactly the same *.c and *.h files as V2. V4 of this patch: * improve formatting as per suggestions of Ran Signed-off-by: Christian Linhart <chris@DemoRecorder.com> Reviewed-by: Ran Benita <ran234@gmail.com> Message-ID: <54562758.5090107@DemoRecorder.com> Patch-Thread-Subject: [Xcb] [PATCHSET] ListInputDevices revision 2 Patch-Set: ListInputDevices Patch-Number: libxcb 1/9 Patch-Version: V4
Diffstat (limited to 'xcb-xv.pc.in')
0 files changed, 0 insertions, 0 deletions