X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=specs%2Fscripts%2Fglspec.py;h=f21b08d5bf82f6670ecea07a44a77d537cfc4f24;hb=656e70fcb18b2579e98ec3f4e6a55a89a9772b74;hp=ab5957a7d19d4dba78d849cfd366743503cf295d;hpb=48412ffde3dd4710c96d5e8d9cfdf1789e4d703a;p=apitrace diff --git a/specs/scripts/glspec.py b/specs/scripts/glspec.py index ab5957a..f21b08d 100755 --- a/specs/scripts/glspec.py +++ b/specs/scripts/glspec.py @@ -235,12 +235,16 @@ class SpecParser(LineParser): try: int(length) except ValueError: - length = "%s" % length + length = '"%s"' % length arg_type = '%s(%s, %s)' % (constructor, base_type, length) else: - length = length.replace("COMPSIZE", "__%s_size" % function_name) - length = length.replace("/", ", ") - arg_type = 'Opaque%s(%s, %s)' % (constructor, base_type, length) + if length == "COMPSIZE(pname)": + length = "_gl_param_size(pname)" + arg_type = '%s(%s, "%s")' % (constructor, base_type, length) + else: + length = length.replace("COMPSIZE", "_%s_size" % function_name) + length = length.replace("/", ", ") + arg_type = 'Opaque%s(%s, "%s")' % (constructor, base_type, length) else: assert False