summaryrefslogtreecommitdiff
path: root/dist/libxcb/src/c_client.py
diff options
context:
space:
mode:
Diffstat (limited to 'dist/libxcb/src/c_client.py')
-rw-r--r--dist/libxcb/src/c_client.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/dist/libxcb/src/c_client.py b/dist/libxcb/src/c_client.py
index d86d05e24..4f3b0894d 100644
--- a/dist/libxcb/src/c_client.py
+++ b/dist/libxcb/src/c_client.py
@@ -448,7 +448,9 @@ def _c_accessor_get_expr(expr, prefix=''):
'''
lenexp = _c_accessor_get_length(expr, prefix)
- if expr.op != None:
+ if expr.op == '~':
+ return '(' + '~' + _c_accessor_get_expr(expr.rhs, prefix) + ')'
+ elif expr.op != None:
return '(' + _c_accessor_get_expr(expr.lhs, prefix) + ' ' + expr.op + ' ' + _c_accessor_get_expr(expr.rhs, prefix) + ')'
elif expr.bitfield:
return 'xcb_popcount(' + lenexp + ')'