aboutsummaryrefslogtreecommitdiff
path: root/bindgen
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2022-11-03 17:55:10 +0100
committerAndre Weissflog <floooh@gmail.com>2022-11-03 17:55:10 +0100
commit818d12e9970fd47e4ded16666bb5585717d22842 (patch)
tree3614cab8043998eca08df6800bb7d758c6f61c15 /bindgen
parent25abcf80cdb8c142d3402b5b67f79b0ab69d08e5 (diff)
bindings generation: dump intermediate JSON for easier debugging
Diffstat (limited to 'bindgen')
-rw-r--r--bindgen/gen_ir.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bindgen/gen_ir.py b/bindgen/gen_ir.py
index 1441c435..0089ae28 100644
--- a/bindgen/gen_ir.py
+++ b/bindgen/gen_ir.py
@@ -119,4 +119,6 @@ def gen(header_path, source_path, module, main_prefix, dep_prefixes):
outp_decl['is_dep'] = is_dep
outp_decl['dep_prefix'] = dep_prefix(decl, dep_prefixes)
outp['decls'].append(outp_decl)
+ with open(f'{module}.json', 'w') as f:
+ f.write(json.dumps(outp, indent=2));
return outp