Browse Source

add support to gen_zig.py for function pointers that return primitive types

Daniel Hooper 2 years ago
parent
commit
cac5fa5ee4
1 changed files with 2 additions and 0 deletions
  1. 2 0
      bindgen/gen_zig.py

+ 2 - 0
bindgen/gen_zig.py

@@ -271,6 +271,8 @@ def funcptr_result_c(field_type):
     res_type = field_type[:field_type.index('(*)')].strip()
     if res_type == 'void':
         return 'void'
+    elif is_prim_type(res_type):
+        return as_zig_prim_type(res_type)
     elif util.is_const_void_ptr(res_type):
         return '?*const anyopaque'
     elif util.is_void_ptr(res_type):