]> git.cworth.org Git - apitrace/blobdiff - apigen/glspec.py
Encode the snapshots as png's.
[apitrace] / apigen / glspec.py
index ec8330c984eb03f0a226eccd57a67fd39381f4b5..72c24fa94e6a691abf1001bf2bbe2f20e76eb300 100755 (executable)
@@ -211,7 +211,7 @@ class SpecParser(LineParser):
         elif kind.startswith("array"):
             arg_type = 'OpaquePointer(%s)' % base_type
 
-            if base_type == 'Void':
+            if base_type in ('Void', 'void', 'GLvoid'):
                 constructor = 'Blob'
             else:
                 constructor = 'Array'
@@ -229,10 +229,9 @@ class SpecParser(LineParser):
                 elif length.find("COMPSIZE") == -1:
                     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 = '%s(%s, "%s")' % (constructor, base_type, length)
+                    arg_type = 'Opaque%s(%s, "%s")' % (constructor, base_type, length)
             if inout == 'in':
                 arg_type = 'Const(%s)' % arg_type
         else: