X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=helpers%2Fglspec.py;h=ec8330c984eb03f0a226eccd57a67fd39381f4b5;hb=1a65d4f6b72866dc04547ecbe7262174ef09cc9a;hp=401c317b064a3825a1dce2ffbb39507af73e9aa9;hpb=89988610e3168f615141a2069aff3c0710e20dbb;p=apitrace diff --git a/helpers/glspec.py b/helpers/glspec.py index 401c317..ec8330c 100755 --- a/helpers/glspec.py +++ b/helpers/glspec.py @@ -211,6 +211,11 @@ class SpecParser(LineParser): elif kind.startswith("array"): arg_type = 'OpaquePointer(%s)' % base_type + if base_type == 'Void': + constructor = 'Blob' + else: + constructor = 'Array' + mo = self.array_re.match(kind) if mo: length = mo.group(1).strip() @@ -222,12 +227,12 @@ class SpecParser(LineParser): elif length == '1': arg_type = 'Pointer(%s)' % base_type elif length.find("COMPSIZE") == -1: - arg_type = 'Array(%s, "%s")' % (base_type, length) + arg_type = '%s(%s, "%s")' % (constructor, base_type, length) else: # XXX: Handle COMPSIZE better length = length.replace("COMPSIZE", "__%s_size" % function_name) - length = length.replace("/", ",") - arg_type = 'Array(%s, "%s")' % (base_type, length) + length = length.replace("/", ", ") + arg_type = '%s(%s, "%s")' % (constructor, base_type, length) if inout == 'in': arg_type = 'Const(%s)' % arg_type else: