[Xcb] [PATCH libxcb 9/9] _c_helper_fieldaccess_expr: remove handling for empty sep
Christian Linhart
chris at demorecorder.com
Thu Oct 30 07:32:00 PDT 2014
The loop-variable "sep" is never empty in function
"_c_helper_fieldaccess_expr", after a fix elsewhere.
Therefore I removed the handling of the case of "sep" being empty.
Thanks to Ran Benita for the hint that this can be removed.
Signed-off-by: Christian Linhart <chris at demorecorder.com>
---
src/c_client.py | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/c_client.py b/src/c_client.py
index 4fedf45..a174e1b 100644
--- a/src/c_client.py
+++ b/src/c_client.py
@@ -574,19 +574,14 @@ def _c_helper_fieldaccess_expr(prefix, field=None):
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 =''
for name, sep, obj in prefix:
prefix_str += last_sep + name
- if '' == sep:
- sep = '->'
- if ((obj.is_case_or_bitcase and obj.has_name) or # named bitcase
- (obj.is_switch and len(obj.parents)>1)):
- sep = '.'
last_sep = sep
if field is None:
# add separator for access to a yet unknown field
prefix_str += last_sep
else:
if _c_field_needs_accessor(field):
--
2.0.1
More information about the Xcb
mailing list