Skip to content

Commit 4472562

Browse files
committed
Update a few more symbol names; move the logic into the .c file instead of the header
1 parent 46850bc commit 4472562

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

CoreFoundation/Base.subproj/CFRuntime.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,6 +1048,16 @@ void __CFInitialize(void) {
10481048

10491049

10501050
#if DEPLOYMENT_RUNTIME_SWIFT
1051+
1052+
#ifndef __CFSwiftGetBaseClass
1053+
#if TARGET_OS_LINUX
1054+
#define __CFSwiftGetBaseClass _TF10Foundation21__CFSwiftGetBaseClassFT_PMPs9AnyObject_
1055+
#elif TARGET_OS_MAC
1056+
#define __CFSwiftGetBaseClass _TF15SwiftFoundation21__CFSwiftGetBaseClassFT_PMPs9AnyObject_
1057+
#endif
1058+
#endif
1059+
extern uintptr_t __CFSwiftGetBaseClass();
1060+
10511061
uintptr_t NSCFType = __CFSwiftGetBaseClass();
10521062
for (CFIndex idx = 1; idx < __CFRuntimeClassTableSize; idx++) {
10531063
__CFRuntimeObjCClassTable[idx] = NSCFType;
@@ -1151,6 +1161,14 @@ void __CFInitialize(void) {
11511161
#endif
11521162
#endif
11531163
#if DEPLOYMENT_RUNTIME_SWIFT
1164+
#ifndef __CFInitializeSwift
1165+
#if TARGET_OS_LINUX
1166+
#define __CFInitializeSwift _TF10Foundation19__CFInitializeSwiftFT_T_
1167+
#elif TARGET_OS_MAC
1168+
#define __CFInitializeSwift _TF15SwiftFoundation19__CFInitializeSwiftFT_T_
1169+
#endif
1170+
#endif
1171+
extern void __CFInitializeSwift();
11541172
__CFInitializeSwift();
11551173
#endif
11561174
{

CoreFoundation/Base.subproj/DarwinSymbolAliases

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22

33
# This is specific to Swift open source; Foundation's NSCFConstantString is used as our constant string class reference
4-
__TMdC15SwiftFoundation19_NSCFConstantString ___CFConstantStringClassReference
4+
__TMC15SwiftFoundation19_NSCFConstantString ___CFConstantStringClassReference
55

66
_kCFCalendarIdentifierBuddhist _kCFBuddhistCalendar
77
_kCFCalendarIdentifierChinese _kCFChineseCalendar

CoreFoundation/Base.subproj/ForSwiftFoundationOnly.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,6 @@ typedef struct __CFSwiftObject *CFSwiftRef;
3737
} \
3838
} while (0)
3939

40-
#ifndef __CFSwiftGetBaseClass
41-
#if TARGET_OS_LINUX
42-
#define __CFSwiftGetBaseClass _TF10Foundation21__CFSwiftGetBaseClassFT_PMPs9AnyObject_
43-
#elif TARGET_OS_MAC
44-
#define __CFSwiftGetBaseClass _TF15SwiftFoundation21__CFSwiftGetBaseClassFT_PMPSs9AnyObject_
45-
#endif
46-
#endif
47-
extern uintptr_t __CFSwiftGetBaseClass();
48-
49-
#ifndef __CFInitializeSwift
50-
#if TARGET_OS_LINUX
51-
#define __CFInitializeSwift _TF10Foundation19__CFInitializeSwiftFT_T_
52-
#elif TARGET_OS_MAC
53-
#define __CFInitializeSwift _TF15SwiftFoundation19__CFInitializeSwiftFT_T_
54-
#endif
55-
#endif
56-
extern void __CFInitializeSwift();
57-
5840
extern bool _CFIsSwift(CFTypeID type, CFSwiftRef obj);
5941
extern void _CFDeinit(CFTypeRef cf);
6042

CoreFoundation/Base.subproj/SymbolAliases

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22

33
# This is specific to Swift open source; Foundation's NSCFConstantString is used as our constant string class reference
4-
__TMdC15SwiftFoundation19_NSCFConstantString ___CFConstantStringClassReference
4+
__TMC15SwiftFoundation19_NSCFConstantString ___CFConstantStringClassReference
55

66
_kCFCalendarIdentifierBuddhist _kCFBuddhistCalendar
77
_kCFCalendarIdentifierChinese _kCFChineseCalendar

0 commit comments

Comments
 (0)