Skip to content

Commit 1b36a51

Browse files
committed
Merge branch 'master' of github.com:apple/swift-corelibs-foundation into json-encoder
# Conflicts: # Foundation.xcodeproj/project.pbxproj # Foundation/Data.swift
2 parents 6147753 + 320a63d commit 1b36a51

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1452
-863
lines changed

CoreFoundation/Base.subproj/CFInternal.h

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -334,21 +334,17 @@ CF_PRIVATE Boolean __CFProcessIsRestricted();
334334
#define STACK_BUFFER_DECL(T, N, C) T N[C]
335335
#endif
336336

337-
#ifdef __ANDROID__
338-
// Avoids crashes on Android
339-
// https://bugs.swift.org/browse/SR-2587
340-
// https://bugs.swift.org/browse/SR-2588
341-
// Seemed to be a linker/relocation? problem.
342-
// CFStrings using CONST_STRING_DECL() were not working
343-
// Applies reference to _NSCFConstantString's isa here
344-
// rather than using a linker option to create an alias.
345-
#define __CFConstantStringClassReference _T010Foundation19_NSCFConstantStringCN
346-
#endif
347337

348-
CF_EXPORT void * __CFConstantStringClassReferencePtr;
349338

350339
#if DEPLOYMENT_RUNTIME_SWIFT
351340

341+
#if TARGET_OS_MAC
342+
#define __CFConstantStringClassReference _T015SwiftFoundation19_NSCFConstantStringCN
343+
#else
344+
#define __CFConstantStringClassReference _T010Foundation19_NSCFConstantStringCN
345+
#endif
346+
347+
CF_EXPORT void * __CFConstantStringClassReferencePtr;
352348
CF_EXPORT void *__CFConstantStringClassReference[];
353349

354350
#if __CF_BIG_ENDIAN__

CoreFoundation/Base.subproj/CFRuntime.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,14 +1005,6 @@ void __CFInitialize(void) {
10051005
memset(__CFRuntimeObjCClassTable, 0, sizeof(__CFRuntimeObjCClassTable));
10061006

10071007
#if DEPLOYMENT_RUNTIME_SWIFT
1008-
1009-
#ifndef __CFSwiftGetBaseClass
1010-
#if TARGET_OS_LINUX
1011-
#define __CFSwiftGetBaseClass _T010Foundation21__CFSwiftGetBaseClassyXlXpyF
1012-
#elif TARGET_OS_MAC
1013-
#define __CFSwiftGetBaseClass _T015SwiftFoundation21__CFSwiftGetBaseClassyXlXpyF
1014-
#endif
1015-
#endif
10161008
extern uintptr_t __CFSwiftGetBaseClass();
10171009

10181010
uintptr_t NSCFType = __CFSwiftGetBaseClass();
@@ -1115,13 +1107,6 @@ void __CFInitialize(void) {
11151107
#endif
11161108

11171109
#if DEPLOYMENT_RUNTIME_SWIFT
1118-
#ifndef __CFInitializeSwift
1119-
#if TARGET_OS_LINUX
1120-
#define __CFInitializeSwift _T010Foundation19__CFInitializeSwiftyyF
1121-
#elif TARGET_OS_MAC
1122-
#define __CFInitializeSwift _T015SwiftFoundation014__CFInitializeA0yyF
1123-
#endif
1124-
#endif
11251110
extern void __CFInitializeSwift();
11261111
__CFInitializeSwift();
11271112
__CFNumberInitialize(); /* needs to happen after Swift bridge is initialized */

CoreFoundation/Base.subproj/SymbolAliases

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
2-
3-
# This is specific to Swift open source; Foundation's NSCFConstantString is used as our constant string class reference
4-
__T015SwiftFoundation19_NSCFConstantStringCN ___CFConstantStringClassReference
5-
61
_kCFCalendarIdentifierBuddhist _kCFBuddhistCalendar
72
_kCFCalendarIdentifierChinese _kCFChineseCalendar
83
_kCFCalendarIdentifierGregorian _kCFGregorianCalendar

Foundation.xcodeproj/project.pbxproj

Lines changed: 83 additions & 81 deletions
Large diffs are not rendered by default.

Foundation/CharacterSet.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ public struct CharacterSet : ReferenceConvertible, Equatable, Hashable, SetAlgeb
486486

487487
@_semantics("convertToObjectiveC")
488488
public func _bridgeToObjectiveC() -> NSCharacterSet {
489-
return unsafeBitCast(_wrapped, to: NSCharacterSet.self)
489+
return _wrapped
490490
}
491491

492492
public static func _forceBridgeFromObjectiveC(_ input: NSCharacterSet, result: inout CharacterSet?) {

0 commit comments

Comments
 (0)