# $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)
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)