[Xcb-commit] src

Julien Danjou jdanjou at kemper.freedesktop.org
Fri May 14 04:20:48 PDT 2010


 src/c_client.py |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit e4b746ac13e89b99abd80b3d1fa2a16796da3b6d
Author: Marcin Kościelnicki <koriakin at 0x04.net>
Date:   Thu May 13 21:05:57 2010 +0000

    Add ~ operator support in code generator
    
    Reviewed-by: Julien Cristau <jcristau at debian.org>
    Signed-off-by: Julien Danjou <julien at danjou.info>

diff --git a/src/c_client.py b/src/c_client.py
index d86d05e..4f3b089 100755
--- a/src/c_client.py
+++ b/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 + ')'


More information about the xcb-commit mailing list