diff options
| author | Garett Bass <garettbass@me.com> | 2021-04-08 17:31:02 -0700 |
|---|---|---|
| committer | Garett Bass <garettbass@me.com> | 2021-04-08 17:31:02 -0700 |
| commit | d200b0ff6c393317f0c16b8844e103a5af2fd302 (patch) | |
| tree | f03c7a5ee62fddef1b705e6309c68af33a690c75 /bindgen | |
| parent | e1058e11ec1dfb799740bf822fb91274adadd16c (diff) | |
a few minor updates:
* regenerated from sokol/master
* src/ext renamed to src/nim
* `Num` enum constants discarded
Diffstat (limited to 'bindgen')
| -rw-r--r-- | bindgen/gen_nim.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/bindgen/gen_nim.py b/bindgen/gen_nim.py index afe3c5b1..fb6ba450 100644 --- a/bindgen/gen_nim.py +++ b/bindgen/gen_nim.py @@ -454,8 +454,11 @@ def gen_enum(decl, prefix): hasForceU32 = False hasExplicitValues = False for item in decl['items']: - if item['name'].endswith("_FORCE_U32"): + itemName = item['name'] + if itemName.endswith("_FORCE_U32"): hasForceU32 = True + elif itemName.endswith("_NUM"): + continue else: if 'value' in item: hasExplicitValues = True @@ -553,13 +556,7 @@ def gen(c_header_path, c_prefix, dep_c_prefixes): ## include extensions in generated code l("# Nim-specific API extensions") - l(f"include ext/{ir['module']}") - - ## copy extensions into generated code - # ext_path = f"sokol-nim/src/sokol/ext/{ir['module']}.nim" - # if os.path.isfile(ext_path): - # with open(ext_path, 'r') as f_ext: - # out_lines += f_ext.read() + l(f"include nim/{ir['module']}") with open(output_path, 'w', newline='\n') as f_outp: f_outp.write(out_lines) |