aboutsummaryrefslogtreecommitdiff
path: root/bindgen
diff options
context:
space:
mode:
authorTrace Andreason <tandreason@gmail.com>2024-05-14 11:28:28 -0700
committerTrace Andreason <tandreason@gmail.com>2024-05-14 11:28:28 -0700
commit91cb0f9d58372d78c9656d401e27e4fe135dc119 (patch)
tree734ba85fe37a120923f0ec6014f96ec296c7b5aa /bindgen
parent0c8d43ea8e16025374dc5d92b1f3c54e306e8704 (diff)
fetch only zig
Diffstat (limited to 'bindgen')
-rw-r--r--bindgen/gen_all.py7
-rw-r--r--bindgen/gen_zig.py4
2 files changed, 7 insertions, 4 deletions
diff --git a/bindgen/gen_all.py b/bindgen/gen_all.py
index 307213c2..4ddd339f 100644
--- a/bindgen/gen_all.py
+++ b/bindgen/gen_all.py
@@ -7,7 +7,6 @@ tasks = [
[ '../sokol_glue.h', 'sglue_', ['sg_'] ],
[ '../sokol_time.h', 'stm_', [] ],
[ '../sokol_audio.h', 'saudio_', [] ],
- [ '../sokol_fetch.h', 'sfetch_', [] ],
[ '../util/sokol_gl.h', 'sgl_', ['sg_'] ],
[ '../util/sokol_debugtext.h', 'sdtx_', ['sg_'] ],
[ '../util/sokol_shape.h', 'sshape_', ['sg_'] ],
@@ -26,8 +25,12 @@ for task in tasks:
gen_nim.gen(c_header_path, main_prefix, dep_prefixes)
# Zig
+zig_tasks = [
+ *tasks,
+ [ '../sokol_fetch.h', 'sfetch_', [] ],
+]
gen_zig.prepare()
-for task in tasks:
+for task in zig_tasks:
[c_header_path, main_prefix, dep_prefixes] = task
gen_zig.gen(c_header_path, main_prefix, dep_prefixes)
diff --git a/bindgen/gen_zig.py b/bindgen/gen_zig.py
index a736cb0e..98328681 100644
--- a/bindgen/gen_zig.py
+++ b/bindgen/gen_zig.py
@@ -62,8 +62,8 @@ overrides = {
'sshape_element_range_t.num_elements': 'uint32_t',
'sdtx_font.font_index': 'uint32_t',
'SGL_NO_ERROR': 'SGL_ERROR_NO_ERROR',
- 'sfetch_continue': 'fetch_continue', # 'fetch' is reserved in Zig
- 'sfetch_desc': 'description' # 'desc' shadowed by earlier definiton
+ 'sfetch_continue': 'continue_fetching', # 'continue' is reserved in Zig
+ 'sfetch_desc': 'sfetch_get_desc' # 'desc' shadowed by earlier definiton
}
prim_types = {