From: Arnaud Vrac Date: Mon, 19 Dec 2011 01:39:41 +0000 (+0100) Subject: Parse static array types in prototypes in gltxt.py X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=792be354f0cf16ff09e343d75e7556421d48ef22;p=apitrace Parse static array types in prototypes in gltxt.py --- diff --git a/specs/scripts/gltxt.py b/specs/scripts/gltxt.py index 07b7046..08b6a57 100755 --- a/specs/scripts/gltxt.py +++ b/specs/scripts/gltxt.py @@ -198,6 +198,11 @@ class TxtParser(LineParser): assert type == 'Void' return '' name = self.tokens.pop(0) + if self.tokens[0] == '[': + self.tokens.pop(0) + n = int(self.tokens.pop(0)) + assert self.tokens.pop(0) == ']' + type = 'Array(%s, %d)' % (type, n) return '(%s, "%s")' % (type, name) def parse_type(self):