Skip to content

Commit 85c640e

Browse files
committed
Fix unnecessary (and broken) preprocessor exclusion
I'm not 100% sure this is the correct fix, but the __nameStringOK static function gets used even if DEPLOYMENT_RUNTIME_SWIFT is unset, so this just breaks the build (linkage) if this block of code gets excluded. It also just doesn't seem very Swift-specific, to my uneducated eye.
1 parent 86f923f commit 85c640e

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

CoreFoundation/NumberDate.subproj/CFTimeZone.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,8 +1013,6 @@ void CFTimeZoneSetAbbreviationDictionary(CFDictionaryRef dict) {
10131013
__CFTimeZoneUnlockGlobal();
10141014
}
10151015

1016-
#if DEPLOYMENT_RUNTIME_SWIFT
1017-
10181016
CF_INLINE const UChar *STRING_to_UTF16(CFStringRef S) { // UTF16String
10191017
CFIndex length = CFStringGetLength((CFStringRef)S);
10201018
UChar *buffer = (UChar *)malloc((length + 1) * sizeof(UChar));
@@ -1244,7 +1242,6 @@ Boolean _CFTimeZoneInit(CFTimeZoneRef timeZone, CFStringRef name, CFDataRef data
12441242
}
12451243
return false;
12461244
}
1247-
#endif
12481245

12491246
CFTimeZoneRef CFTimeZoneCreate(CFAllocatorRef allocator, CFStringRef name, CFDataRef data) {
12501247
// assert: (NULL != name && NULL != data);

0 commit comments

Comments
 (0)