diff options
| author | Daniel Hooper <danielchasehooper@gmail.com> | 2023-09-19 19:59:01 -0400 |
|---|---|---|
| committer | Daniel Hooper <danielchasehooper@gmail.com> | 2023-09-19 19:59:01 -0400 |
| commit | cac5fa5ee440ec7f5b7c8420ea2831439ae1281e (patch) | |
| tree | 1a73faf453721ab4f4ff451b2bef4c3acaa83d87 /bindgen/gen_zig.py | |
| parent | d26015535a3ddc958709097bf41497535ae063cc (diff) | |
add support to gen_zig.py for function pointers that return primitive types
Diffstat (limited to 'bindgen/gen_zig.py')
| -rw-r--r-- | bindgen/gen_zig.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bindgen/gen_zig.py b/bindgen/gen_zig.py index b1631ebc..cef75e9e 100644 --- a/bindgen/gen_zig.py +++ b/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): |