]> git.tdb.fi Git - gldbg.git/blobdiff - source/glprint.funcs.t
Enhance the object-orientedness of genwrap.py
[gldbg.git] / source / glprint.funcs.t
index 927fa366ea3afd75b9e97d52b358ea70a6a594ad..9c62ee0b2de2b2d0fd67954c60b1436c1a3240f0 100644 (file)
@@ -1,7 +1,4 @@
 # $Id$
-^typemap gl.tm
-^iomap gl.io
-^spec gl gl.spec
 w('static void print_%s(void *user_data', func.name)
 if ret.ctype!="void":
        w(', %s ret', ret.ctype)
@@ -24,10 +21,13 @@ w(')')
 if ret.ctype!="void":
        w(' = %s', ret.io[1])
 w('"')
-for p in params:
-       w(', %s', p.name)
-if ret.ctype!="void":
-       w(', ret')
+for p in params+[ret]:
+       if p.ctype!="void":
+               if p.io and len(p.io)>=3 and p.io[2]:
+                       f = p.io[2].split(':')
+                       w(', %s(%s)', f[0], ", ".join(eval(x) for x in f[1:]))
+               else:
+                       w(', %s', p.name)
 wl(');')
 wl('}')
 :static void init_print(GlDecoder *dec)