Skip to content

Commit 139e47d

Browse files
authored
Merge pull request #1718 from compnerd/cpp
Base: merge two identical CPP cases
2 parents 7418081 + eae5329 commit 139e47d

File tree

1 file changed

+4
-23
lines changed

1 file changed

+4
-23
lines changed

CoreFoundation/Base.subproj/CFInternal.h

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -504,37 +504,18 @@ CF_EXPORT id __NSDictionary0__;
504504
CF_EXPORT id __NSArray0__;
505505

506506

507-
#if DEPLOYMENT_TARGET_MACOSX
507+
#if TARGET_OS_MAC
508508

509509
typedef pthread_mutex_t CFLock_t;
510510

511511
#define CFLockInit ((pthread_mutex_t)PTHREAD_ERRORCHECK_MUTEX_INITIALIZER)
512512
#define CF_LOCK_INIT_FOR_STRUCTS(X) (X = CFLockInit)
513513

514-
#define __CFLock(LP) ({ \
515-
(void)pthread_mutex_lock(LP); })
514+
#define __CFLock(LP) ({ (void)pthread_mutex_lock(LP); })
516515

517-
#define __CFUnlock(LP) ({ \
518-
(void)pthread_mutex_unlock(LP); })
516+
#define __CFUnlock(LP) ({ (void)pthread_mutex_unlock(LP); })
519517

520-
#define __CFLockTry(LP) ({ \
521-
pthread_mutex_trylock(LP) == 0; })
522-
523-
#elif DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_EMBEDDED_MINI
524-
525-
typedef pthread_mutex_t CFLock_t;
526-
527-
#define CFLockInit ((pthread_mutex_t)PTHREAD_ERRORCHECK_MUTEX_INITIALIZER)
528-
#define CF_LOCK_INIT_FOR_STRUCTS(X) (X = CFLockInit)
529-
530-
#define __CFLock(LP) ({ \
531-
(void)pthread_mutex_lock(LP); })
532-
533-
#define __CFUnlock(LP) ({ \
534-
(void)pthread_mutex_unlock(LP); })
535-
536-
#define __CFLockTry(LP) ({ \
537-
pthread_mutex_trylock(LP) == 0; })
518+
#define __CFLockTry(LP) ({ pthread_mutex_trylock(LP) == 0; })
538519

539520
#elif DEPLOYMENT_TARGET_WINDOWS
540521

0 commit comments

Comments
 (0)