3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/os-specific/darwin/apple-source-releases/CF/cf-bridging.patch

40 lines
931 B
Diff

diff --git a/CFBase.h b/CFBase.h
index ffddd2b..e5a926b 100644
--- a/CFBase.h
+++ b/CFBase.h
@@ -249,6 +249,33 @@ CF_EXTERN_C_BEGIN
#endif
#endif
+#if __has_attribute(objc_bridge) && __has_feature(objc_bridge_id) && __has_feature(objc_bridge_id_on_typedefs)
+
+#ifdef __OBJC__
+@class NSArray;
+@class NSAttributedString;
+@class NSString;
+@class NSNull;
+@class NSCharacterSet;
+@class NSData;
+@class NSDate;
+@class NSTimeZone;
+@class NSDictionary;
+@class NSError;
+@class NSLocale;
+@class NSNumber;
+@class NSSet;
+@class NSURL;
+#endif
+
+#define CF_BRIDGED_TYPE(T) __attribute__((objc_bridge(T)))
+#define CF_BRIDGED_MUTABLE_TYPE(T) __attribute__((objc_bridge_mutable(T)))
+#define CF_RELATED_TYPE(T,C,I) __attribute__((objc_bridge_related(T,C,I)))
+#else
+#define CF_BRIDGED_TYPE(T)
+#define CF_BRIDGED_MUTABLE_TYPE(T)
+#define CF_RELATED_TYPE(T,C,I)
+#endif
CF_EXPORT double kCFCoreFoundationVersionNumber;