From c3bd7d80cd7535c7f76b06aaa6f29563e8730693 Mon Sep 17 00:00:00 2001 From: treeform Date: Fri, 26 Dec 2025 18:12:00 -0800 Subject: [PATCH] Fix incompatible function pointer issue. --- src/windy/platforms/macos/objc.nim | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/windy/platforms/macos/objc.nim b/src/windy/platforms/macos/objc.nim index 507cb13..bb6fbc6 100644 --- a/src/windy/platforms/macos/objc.nim +++ b/src/windy/platforms/macos/objc.nim @@ -1,15 +1,14 @@ import macros, strutils, typetraits -# Because we cast many of the ObjC functions to proc pointers, we get a warning. -# They used to be fine but they turned into errors, turn them into warnings again. -{.passC: "-Wno-incompatible-function-pointer-types".} - type Class* = distinct int ID* = distinct int SEL* = distinct int Protocol* = distinct int - IMP* = proc(self: ID, cmd: SEL): ID {.cdecl, varargs.} + ## ObjC method implementation pointer. Treat as opaque to avoid strict + ## signature checks across varying method shapes. + ## Previously: IMP* = proc(self: ID, cmd: SEL): ID {.cdecl, varargs.} + IMP* = pointer objc_super* = object receiver*: ID super_class*: Class