]> git.tdb.fi Git - gldbg.git/blobdiff - source/glprint.funcs.t
Quick hack to not crash when printing enum arrays
[gldbg.git] / source / glprint.funcs.t
index db626c0539efecdb4a3530fb2b88f79625198a04..d98f6e72102389bd6cac9a78a5fb79af8fdde7da 100644 (file)
@@ -18,7 +18,7 @@ for p in params:
                if p.io:
                        w('{%s}', p.io[1])
                else:
-                       w('<ref:%s>', p.type)
+                       w('<ref:%s %%p>', p.type)
        elif p.kind=="array":
                w('%%s')
        first = False
@@ -37,13 +37,18 @@ for p in params+[ret]:
                elif p.kind=="reference":
                        if p.io:
                                w(', *%s', p.name)
+                       else:
+                               w(', %s', p.name)
                elif p.kind=="array":
                        if not p.csize:
                                w(', print_data(%s, 0)', p.name)
                        elif p.base_ctype=="GLvoid" or p.base_ctype=="void":
                                w(', print_data(%s, %s)', p.name, p.csize)
                        else:
-                               w(', print_array("%s", %s, sizeof(%s), %s)', p.io[1], p.name, p.base_ctype, p.csize)
+                               f = p.io[1]
+                               if len(p.io)>=3 and p.io[2]:
+                                       f = "%x"
+                               w(', print_array("%s", %s, sizeof(%s), %s)', f, p.name, p.base_ctype, p.csize)
 wl(');')
 wl('}')
 :static void init_print(GlDecoder *dec)