summaryrefslogtreecommitdiff
path: root/xcbgen
diff options
context:
space:
mode:
authorChristian Linhart <chris@demorecorder.com>2014-09-08 02:29:06 +0200
committerChristian Linhart <chris@demorecorder.com>2014-11-03 11:23:23 +0100
commit4f3678a406c230e41b96cb0e6def53070a1a50fd (patch)
tree215f1ca2d8bc73dbf069d99aa9556e4d84420271 /xcbgen
parentb98639bbe3338ce9e5643db0255e4746016b12b4 (diff)
downloadxcb-proto-4f3678a406c230e41b96cb0e6def53070a1a50fd.tar.gz
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 <chris@DemoRecorder.com>
Diffstat (limited to 'xcbgen')
-rw-r--r--xcbgen/expr.py4
1 files changed, 4 insertions, 0 deletions
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')