From ce3354d7bf22622f1d99b016a15a2dacce107ffa Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 25 Oct 2025 11:04:48 +0200 Subject: [PATCH 17/48] guard __OBJC__ --- include/wx/defs.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/wx/defs.h b/include/wx/defs.h index 7831720cd9..7e2f294ce2 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -2854,6 +2854,8 @@ typedef WX_UIPasteboard WXOSXPasteboard; // Define a for loop macro to iterate over Objective-C collections that works also for // compilers like gcc that does not support the "for .. in" syntax. +#if defined(__OBJC__) + #if OBJC_API_VERSION >= 2 #define wxOBJC_FOR_LOOP(var, collection) \ @@ -2871,6 +2873,8 @@ typedef WX_UIPasteboard WXOSXPasteboard; #define wxOBJC_END_FOR_LOOP \ } +#endif + #endif /* __DARWIN__ */ /* ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port */ -- 2.24.3 (Apple Git-128)