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_nim.py | |
| parent | ca91acb03bcea2ec14a49baa939dc37ad868b768 (diff) | |
bindings generation minor code cleanup
Diffstat (limited to 'bindgen/gen_nim.py')
| -rw-r--r-- | bindgen/gen_nim.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bindgen/gen_nim.py b/bindgen/gen_nim.py index a01c057d..6d5ad851 100644 --- a/bindgen/gen_nim.py +++ b/bindgen/gen_nim.py @@ -148,6 +148,9 @@ xor yield """.split() + common_prim_types +re_1d_array = re.compile("^(?:const )?\w*\s\*?\[\d*\]$") +re_2d_array = re.compile("^(?:const )?\w*\s\*?\[\d*\]\[\d*\]$") + struct_types = [] enum_types = [] out_lines = '' @@ -160,9 +163,6 @@ def reset_globals(): enum_types = [] 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' @@ -609,7 +609,7 @@ def gen_module(inp, dep_prefixes): gen_extra(inp) def prepare(): - print('Generating nim bindings:') + print('=== Generating Nim bindings:') if not os.path.isdir('sokol-nim/src/sokol'): os.makedirs('sokol-nim/src/sokol') if not os.path.isdir('sokol-nim/src/sokol/c'): @@ -617,7 +617,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 global out_lines module_name = module_names[c_prefix] |