From f8b130e48b7d97dd1ace9c0c3cb6ef621f37ffd2 Mon Sep 17 00:00:00 2001 From: Christian Linhart Date: Thu, 30 Oct 2014 15:31:59 +0100 Subject: [PATCH] function _c_helper_fieldaccess_expr: improve description Signed-off-by: Christian Linhart Message-ID: <1414679520-50871-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 8/9 Patch-Version: V1 Signed-off-by: Christian Linhart --- src/c_client.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/c_client.py b/src/c_client.py index 44c88ed..c4b7d76 100644 --- a/src/c_client.py +++ b/src/c_client.py @@ -562,8 +562,17 @@ def _c_field_is_member_of_case_or_bitcase(field): def _c_helper_fieldaccess_expr(prefix, field=None): """ turn prefix, which is a list of tuples (name, separator, Type obj) into a string - representing a valid name in C (based on the context) - if field is not None, append the field name as well + representing a valid field-access-expression in C (based on the context) + if field is not None, append access to the field as well. + + "separator" is one of the C-operators "." or "->". + + A field access expression can consist of the following components: + * struct/union member access from a value with the "."-operator + * struct/union member access from a pointer with "->"-operator + * function-call of an accessor function: + This is used when a xcb-field is not contained in a struct. + This can, e.g., happen for fields after var-sized fields, etc. """ prefix_str = '' last_sep ='' -- 2.34.1