Explorar el Código

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

Daniel Hooper hace 2 años
padre
commit
cac5fa5ee4
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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):