Merge pull request #1209 from xwu/patch-1
Correct a typo for thread-specific set [NFC]
diff --git a/CoreFoundation/Base.subproj/CFPlatform.c b/CoreFoundation/Base.subproj/CFPlatform.c
index 6dd5564..896193f 100644
--- a/CoreFoundation/Base.subproj/CFPlatform.c
+++ b/CoreFoundation/Base.subproj/CFPlatform.c
@@ -1301,7 +1301,7 @@
return (CFTypeRef)pthread_getspecific(key);
}
-void _CThreadSpecificSet(_CFThreadSpecificKey key, CFTypeRef _Nullable value) {
+void _CFThreadSpecificSet(_CFThreadSpecificKey key, CFTypeRef _Nullable value) {
if (value != NULL) {
swift_retain((void *)value);
pthread_setspecific(key, value);
diff --git a/CoreFoundation/Base.subproj/ForSwiftFoundationOnly.h b/CoreFoundation/Base.subproj/ForSwiftFoundationOnly.h
index ea62f88..a3063c2 100644
--- a/CoreFoundation/Base.subproj/ForSwiftFoundationOnly.h
+++ b/CoreFoundation/Base.subproj/ForSwiftFoundationOnly.h
@@ -301,7 +301,7 @@
typedef pthread_key_t _CFThreadSpecificKey;
CF_EXPORT CFTypeRef _Nullable _CFThreadSpecificGet(_CFThreadSpecificKey key);
-CF_EXPORT void _CThreadSpecificSet(_CFThreadSpecificKey key, CFTypeRef _Nullable value);
+CF_EXPORT void _CFThreadSpecificSet(_CFThreadSpecificKey key, CFTypeRef _Nullable value);
CF_EXPORT _CFThreadSpecificKey _CFThreadSpecificKeyCreate(void);
typedef pthread_attr_t _CFThreadAttributes;
diff --git a/Foundation/Thread.swift b/Foundation/Thread.swift
index 340ec7f..402294d 100644
--- a/Foundation/Thread.swift
+++ b/Foundation/Thread.swift
@@ -23,13 +23,13 @@
return specific as! T
} else {
let value = generator()
- _CThreadSpecificSet(key, value)
+ _CFThreadSpecificSet(key, value)
return value
}
}
internal func set(_ value: T) {
- _CThreadSpecificSet(key, value)
+ _CFThreadSpecificSet(key, value)
}
}