Преглед на файлове

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

Daniel Hooper преди 2 години
родител
ревизия
cac5fa5ee4
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  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):