From: David Elliott Date: Sat, 6 Sep 2003 17:36:51 +0000 (+0000) Subject: wxCocoa: CodeWarrior (like GCC) mangles struct X and @class X identically. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3529fcc96ad95cb60a965b4f0a1d484f37bb0f11 wxCocoa: CodeWarrior (like GCC) mangles struct X and @class X identically. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/defs.h b/include/wx/defs.h index 3dcfa9e09a..c9cf3236c5 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -2051,7 +2051,7 @@ typedef ControlHandle WXWidget; #ifdef __WXCOCOA__ // NOTE: This ought to work with other compilers too, but I'm being cautious -#if defined(__GNUC__) && defined(__APPLE__) +#if (defined(__GNUC__) && defined(__APPLE__)) || defined(__MWERKS__) /* It's desirable to have type safety for Objective-C(++) code as it does at least catch typos of method names among other things. However, it is not possible to declare an Objective-C class from plain old C or C++ @@ -2071,7 +2071,7 @@ typedef klass *WX_##klass typedef struct klass *WX_##klass #endif // defined(__OBJC__) -#else // not GNU +#else // not Apple's GNU or CodeWarrior #warning "Objective-C types will not be checked by the compiler." // NOTE: typedef struct objc_object *id; // IOW, we're declaring these using the id type without using that name, @@ -2081,7 +2081,7 @@ typedef struct klass *WX_##klass #define DECLARE_WXCOCOA_OBJC_CLASS(klass) \ typedef struct objc_object *WX_##klass -#endif // defined(__GNUC__) && defined(__APPLE__) +#endif // (defined(__GNUC__) && defined(__APPLE__)) || defined(__MWERKS__) DECLARE_WXCOCOA_OBJC_CLASS(NSApplication); DECLARE_WXCOCOA_OBJC_CLASS(NSBitmapImageRep);