Skip to content

Commit bb66a54

Browse files
committed
Locale, Plugin: s/PTHREAD_MUTEX_INITIALIZER/CFLockInit/
Replace the `PTHREAD_MUTEX_INITIALIZER` uses with the internal macro `CFLockInit`.
1 parent b52af6d commit bb66a54

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

CoreFoundation/Locale.subproj/CFDateFormatter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ CFArrayRef CFDateFormatterCreateDateFormatsFromTemplates(CFAllocatorRef allocato
5858

5959
static Boolean useTemplatePatternGenerator(CFLocaleRef locale, void(^work)(UDateTimePatternGenerator *ptg)) {
6060
static UDateTimePatternGenerator *ptg;
61-
static CFLock_t ptgLock = PTHREAD_MUTEX_INITIALIZER;
61+
static CFLock_t ptgLock = CFLockInit;
6262
static const char *ptgLocaleName;
6363
CFStringRef ln = locale ? CFLocaleGetIdentifier(locale) : CFSTR("");
6464
char buffer[BUFFER_SIZE];

CoreFoundation/PlugIn.subproj/CFBundle.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ CONST_STRING_DECL(_kCFBundleCFMLoadAsBundleKey, "CFBundleCFMLoadAsBundle")
119119
// Keys used by NSBundle for loaded Info plists.
120120
CONST_STRING_DECL(_kCFBundlePrincipalClassKey, "NSPrincipalClass")
121121

122-
static CFLock_t CFBundleGlobalDataLock = PTHREAD_MUTEX_INITIALIZER;
122+
static CFLock_t CFBundleGlobalDataLock = CFLockInit;
123123

124124
static CFMutableDictionaryRef _bundlesByIdentifier = NULL;
125125
static CFMutableDictionaryRef _bundlesByURL = NULL;

CoreFoundation/PlugIn.subproj/CFBundle_Main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ static Boolean _initedMainBundle = false;
2424
static CFBundleRef _mainBundle = NULL;
2525
static char __CFBundleMainID__[1026] = {0};
2626
char *__CFBundleMainID = __CFBundleMainID__;
27-
static CFLock_t _mainBundleLock = PTHREAD_MUTEX_INITIALIZER;
27+
static CFLock_t _mainBundleLock = CFLockInit;
2828

2929
#pragma mark -
3030

0 commit comments

Comments
 (0)