diff --git a/src/generate.zig b/src/generate.zig index ccb2d4b..3d7d799 100644 --- a/src/generate.zig +++ b/src/generate.zig @@ -955,12 +955,17 @@ fn writePointerType( // value or nullable. We fall back to a c pointer so that the user can decide how to // interpret it with less friction, unless it's an opaque type in which case that's not // allowed so we assume it's a nullable single value pointer. - // XXX: ... - const is_context = ty.declaration != null and std.mem.eql(u8, "ImGuiContext*", ty.declaration.?); // https://codeberg.org/Games-by-Mason/dear_imgui_zig/issues/5 + + // https://codeberg.org/Games-by-Mason/dear_imgui_zig/issues/5 + const is_context = ty.declaration != null and std.mem.eql( + u8, + "ImGuiContext*", + ty.declaration.?, + ); + if (is_opaque or is_void or is_context) { try writer.writeAll("?*"); } else { - std.log.err("{}", .{ty}); try writer.writeAll("[*c]"); } }