]> git.cworth.org Git - apitrace/blobdiff - specs/scripts/glspec.py
d3dretrace: Fix MinGW build.
[apitrace] / specs / scripts / glspec.py
index ab5957a7d19d4dba78d849cfd366743503cf295d..f21b08d5bf82f6670ecea07a44a77d537cfc4f24 100755 (executable)
@@ -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