فهرست منبع

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