diff options
| author | Andre Weissflog <floooh@gmail.com> | 2022-07-14 20:11:37 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2022-07-14 20:11:37 +0200 |
| commit | fbe8a11be350e6f926c91c960fd009aa3dcbcbcf (patch) | |
| tree | 628399cbf219b6d68773cb330ef591ba93085bb8 /bindgen/gen_zig.py | |
| parent | ca91acb03bcea2ec14a49baa939dc37ad868b768 (diff) | |
bindings generation minor code cleanup
Diffstat (limited to 'bindgen/gen_zig.py')
| -rw-r--r-- | bindgen/gen_zig.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bindgen/gen_zig.py b/bindgen/gen_zig.py index 59e7825b..149df3de 100644 --- a/bindgen/gen_zig.py +++ b/bindgen/gen_zig.py @@ -89,6 +89,9 @@ prim_defaults = { 'size_t': '0' } +re_1d_array = re.compile("^(?:const )?\w*\s\*?\[\d*\]$") +re_2d_array = re.compile("^(?:const )?\w*\s\*?\[\d*\]\[\d*\]$") + struct_types = [] enum_types = [] enum_items = {} @@ -104,9 +107,6 @@ def reset_globals(): enum_items = {} out_lines = '' -re_1d_array = re.compile("^(?:const )?\w*\s\*?\[\d*\]$") -re_2d_array = re.compile("^(?:const )?\w*\s\*?\[\d*\]\[\d*\]$") - def l(s): global out_lines out_lines += s + '\n' @@ -558,7 +558,7 @@ def gen_module(inp, dep_prefixes): gen_func_zig(decl, prefix) def prepare(): - print('Generating zig bindings:') + print('=== Generating Zig bindings:') if not os.path.isdir('sokol-zig/src/sokol'): os.makedirs('sokol-zig/src/sokol') if not os.path.isdir('sokol-zig/src/sokol/c'): @@ -566,7 +566,7 @@ def prepare(): def gen(c_header_path, c_prefix, dep_c_prefixes): if not c_prefix in module_names: - print(f'warning: skipping generation for {c_prefix} prefix...') + print(f' >> warning: skipping generation for {c_prefix} prefix...') return module_name = module_names[c_prefix] c_source_path = c_source_paths[c_prefix] |