Skip to content

Commit

Permalink
Merge pull request #1049 from trace-andreason/master
Browse files Browse the repository at this point in the history
add asRange helper to fetch binding generation
  • Loading branch information
floooh committed May 17, 2024
2 parents e98349a + 94d6e25 commit c2d01bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bindgen/gen_zig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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));')
Expand Down

0 comments on commit c2d01bc

Please sign in to comment.