From: Christian Linhart Date: Mon, 8 Sep 2014 00:29:06 +0000 (+0200) Subject: xcbgen: support paramref in the parser X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f3678a406c230e41b96cb0e6def53070a1a50fd;hp=b98639bbe3338ce9e5643db0255e4746016b12b4;p=free-sw%2Fxcb%2Fproto xcbgen: support paramref in the parser paramref is similar to fieldref, but has a type attribute. Message-ID: <1410136150-30254-1-git-send-email-chris@demorecorder.com> Patch-Thread-Subject: [Xcb] parametrized structs implemented Patch-Set: ParametrizedStruct Patch-Number: proto 1/5 Patch-Version: V1 Signed-off-by: Christian Linhart --- diff --git a/xcbgen/expr.py b/xcbgen/expr.py index f3bf462..e6895ff 100644 --- a/xcbgen/expr.py +++ b/xcbgen/expr.py @@ -64,6 +64,10 @@ class Expression(object): # Standard list with a fieldref self.lenfield_name = elt.text + elif elt.tag == 'paramref': + self.lenfield_name = elt.text + self.lenfield_type = elt.get('type') + elif elt.tag == 'valueparam': # Value-mask. The length bitmask is described by attributes. self.lenfield_name = elt.get('value-mask-name')