summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Linhart <chris@DemoRecorder.com>2014-11-02 13:46:50 +0100
committerChristian Linhart <chris@demorecorder.com>2014-11-03 11:23:16 +0100
commitd905b886185fd8e0d9d7f70e0d112cb58ab86f98 (patch)
tree183828b79776d8830d33c6260baf5b7abbd8ba9d
parent17f6e04493c93014beaf3a704c8cc4d050cb13bf (diff)
function _c_helper_fieldaccess_expr: improve description
Signed-off-by: Christian Linhart <chris@demorecorder.com> Reviewed-by: Ran Benita <ran234@gmail.com> Message-ID: <545627BA.1000909@DemoRecorder.com> Patch-Thread-Subject: [Xcb] [PATCHSET] ListInputDevices revision 2 Patch-Set: ListInputDevices Patch-Number: libxcb 8/9 Patch-Version: V1
-rw-r--r--src/c_client.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/c_client.py b/src/c_client.py
index 409054b..5a41f9a 100644
--- a/src/c_client.py
+++ b/src/c_client.py
@@ -552,8 +552,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 =''