aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrace Andreason <tandreason@gmail.com>2024-05-16 17:15:46 -0700
committerTrace Andreason <tandreason@gmail.com>2024-05-16 17:15:46 -0700
commit94d6e253b5878537d0bf0ebcea2cc27530497b88 (patch)
tree9bff677d176ed971ccc8560885c6d714dd768fd7
parente98349a9e670db67140cb0a9aa35eb492b1a1a10 (diff)
add asRange helper to fetch binding generation
-rw-r--r--bindgen/gen_zig.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bindgen/gen_zig.py b/bindgen/gen_zig.py
index 1bfa42db..57e2f860 100644
--- a/bindgen/gen_zig.py
+++ b/bindgen/gen_zig.py
@@ -460,7 +460,7 @@ def gen_helpers(inp):
l('fn cStrToZig(c_str: [*c]const u8) [:0]const u8 {')
l(' return @import("std").mem.span(c_str);')
l('}')
- if inp['prefix'] in ['sg_', 'sdtx_', 'sshape_']:
+ if inp['prefix'] in ['sg_', 'sdtx_', 'sshape_', 'sfetch_']:
l('// helper function to convert "anything" to a Range struct')
l('pub fn asRange(val: anytype) Range {')
l(' const type_info = @typeInfo(@TypeOf(val));')