summaryrefslogtreecommitdiff
path: root/src/c_client.py
diff options
context:
space:
mode:
authorChristian Linhart <chris@demorecorder.com>2014-09-04 17:50:50 +0200
committerChristian Linhart <chris@demorecorder.com>2014-11-03 11:23:17 +0100
commit422458b66380e4103c4937f0e2e8bb93e31f273a (patch)
tree4a55cb44dddc2f45bed52354dc9c26a92a92581b /src/c_client.py
parentb1e4a3bbd8194d12d7fcd9705fcbbe0deb59bcba (diff)
generator: _c_accessor_get_length: remove buggy special case
The function _c_accessor_get_length had a special case handling for intermixed var and fixed size fields. However: * The implementation of that special case was buggy: It tried to call a python-dict as a function which causes Python to abort the program with a stacktrace and error message. So this code was never used. * The case it tried to handle is handeled elsewhere in the meantime: in _c_helper_absolute_name by previous patches made by me. Message-ID: <1409845851-38950-3-git-send-email-chris@demorecorder.com> Patch-Thread-Subject: [Xcb] support popcount of a list and associated xml changes Patch-Set: PopcountList Patch-Number: libxcb 3/4 Patch-Version: V1 Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Diffstat (limited to 'src/c_client.py')
-rw-r--r--src/c_client.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/c_client.py b/src/c_client.py
index 9c71e1a..88321f4 100644
--- a/src/c_client.py
+++ b/src/c_client.py
@@ -1590,12 +1590,7 @@ def _c_accessor_get_length(expr, field_mapping=None):
if field_mapping is not None:
lenfield_name = field_mapping[lenfield_name][0]
- if expr.lenfield is not None and expr.lenfield.prev_varsized_field is not None:
- # special case: variable and fixed size fields are intermixed
- # if the lenfield is among the fixed size fields, there is no need
- # to call a special accessor function like <expr.lenfield.c_accessor_name + '(' + prefix + ')'>
- return field_mapping(expr.lenfield_name)
- elif expr.lenfield_name is not None:
+ if expr.lenfield_name is not None:
return lenfield_name
else:
return str(expr.nmemb)