mkenums: Use the same reporting functions from genmarshal
[glib.git] / gobject / tests / gobject_test_marshal.py
blob66a7aecae36a79dc35c6cf1dedfe0bfa38caa415
1 #!/usr/bin/env python3
3 # FIXME: where does the #include "marshalers.h" go?
5 import sys, subprocess
7 if len(sys.argv) != 3:
8 print('Usage: {0} <listname> <outputfile>')
9 sys.exit(0)
11 glib_genmarshal = sys.argv[1]
12 listname = sys.argv[2]
13 outname = sys.argv[3]
15 if outname.endswith('.h'):
16 arg = '--header'
17 else:
18 arg = '--body'
20 output = subprocess.check_output([glib_genmarshal, '--prefix=test', '--valist-marshallers', arg, listname])
21 open(outname, 'wb').write(output)