@@ -21,6 +21,14 @@
|
|||||||
// Include AvailabilityMacros for DEPRECATED_ATTRIBUTE
|
// Include AvailabilityMacros for DEPRECATED_ATTRIBUTE
|
||||||
#include <AvailabilityMacros.h>
|
#include <AvailabilityMacros.h>
|
||||||
|
|
||||||
|
#if __has_feature(objc_arc)
|
||||||
|
#define WX_OSX_BRIDGE_RETAINED __bridge_retained
|
||||||
|
#define WX_OSX_BRIDGE __bridge
|
||||||
|
#else
|
||||||
|
#define WX_OSX_BRIDGE_RETAINED
|
||||||
|
#define WX_OSX_BRIDGE
|
||||||
|
#endif
|
||||||
|
|
||||||
// #include <CoreFoundation/CFBase.h>
|
// #include <CoreFoundation/CFBase.h>
|
||||||
/* Don't include CFBase.h such that this header can be included from public
|
/* Don't include CFBase.h such that this header can be included from public
|
||||||
* headers with minimal namespace pollution.
|
* headers with minimal namespace pollution.
|
||||||
|
@@ -43,7 +43,7 @@ public:
|
|||||||
|
|
||||||
#ifdef __OBJC__
|
#ifdef __OBJC__
|
||||||
wxCFStringRef(WX_NSString ref)
|
wxCFStringRef(WX_NSString ref)
|
||||||
: wxCFRef< CFStringRef >((__bridge_retained CFStringRef) ref)
|
: wxCFRef< CFStringRef >((WX_OSX_BRIDGE_RETAINED CFStringRef) ref)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -71,7 +71,7 @@ public:
|
|||||||
static wxString AsStringWithNormalizationFormC( WX_NSString ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
|
static wxString AsStringWithNormalizationFormC( WX_NSString ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
|
||||||
#endif
|
#endif
|
||||||
#ifdef __OBJC__
|
#ifdef __OBJC__
|
||||||
WX_NSString AsNSString() const { return (__bridge WX_NSString)(CFStringRef) *this; }
|
WX_NSString AsNSString() const { return (WX_OSX_BRIDGE WX_NSString)(CFStringRef) *this; }
|
||||||
#endif
|
#endif
|
||||||
private:
|
private:
|
||||||
} ;
|
} ;
|
||||||
|
Reference in New Issue
Block a user