浏览代码

Merge pull request #1049 from trace-andreason/master

add asRange helper to fetch binding generation
Andre Weissflog 1 年之前
父节点
当前提交
c2d01bc25c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      bindgen/gen_zig.py

+ 1 - 1
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));')