Skip to content

Commit 0faf01e

Browse files
committed
Enable CF implicit bridges to types so that Unmanaged is avoided
1 parent a64b235 commit 0faf01e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CoreFoundation/Base.subproj/ForSwiftFoundationOnly.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <fts.h>
2020

2121
CF_ASSUME_NONNULL_BEGIN
22+
CF_IMPLICIT_BRIDGING_ENABLED
2223

2324
struct __CFSwiftObject {
2425
uintptr_t isa;
@@ -271,6 +272,7 @@ extern void _cf_uuid_unparse(const _cf_uuid_t uu, _cf_uuid_string_t out);
271272
extern void _cf_uuid_unparse_lower(const _cf_uuid_t uu, _cf_uuid_string_t out);
272273
extern void _cf_uuid_unparse_upper(const _cf_uuid_t uu, _cf_uuid_string_t out);
273274

275+
CF_IMPLICIT_BRIDGING_DISABLED
274276
CF_ASSUME_NONNULL_END
275277

276278
#endif /* __COREFOUNDATION_FORSWIFTFOUNDATIONONLY__ */

Foundation/NSProcessInfo.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class NSProcessInfo : NSObject {
4646

4747

4848
internal static var _environment: [String : String] = {
49-
let dict = __CFGetEnvironment().takeUnretainedValue()._nsObject
49+
let dict = __CFGetEnvironment()._nsObject
5050
var env = [String : String]()
5151
dict.enumerateKeysAndObjectsUsingBlock { key, value, stop in
5252
env[(key as! NSString)._swiftObject] = (value as! NSString)._swiftObject
@@ -96,7 +96,7 @@ public class NSProcessInfo : NSObject {
9696

9797
public var operatingSystemVersionString: String {
9898
get {
99-
return CFCopySystemVersionString().takeRetainedValue()._swiftObject
99+
return CFCopySystemVersionString()._swiftObject
100100
}
101101
}
102102

0 commit comments

Comments
 (0)