From 1ddb352f1d7621deeb93848dedf034dc5d271a1f Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Tue, 11 Aug 2009 18:30:29 +0000 Subject: [Author: dmaclach] Fixed up GTMGoogleSearch so that it actually works on the iPhone Device. Fixed up some GTMNSObject+KVO issues on the iPhone Device. Fixed up GTMObjC2Runtime so that it actually compiles on the device. Added debugging capabilities to KVO with GTM. Removed unnecessary GTM_* system version macros from GTMDefines.h R=thomasvl DELTA=185 (153 added, 19 deleted, 13 changed) --- Foundation/GTMObjC2Runtime.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'Foundation/GTMObjC2Runtime.h') diff --git a/Foundation/GTMObjC2Runtime.h b/Foundation/GTMObjC2Runtime.h index 2c25841..4f569a5 100644 --- a/Foundation/GTMObjC2Runtime.h +++ b/Foundation/GTMObjC2Runtime.h @@ -75,7 +75,7 @@ OBJC_EXPORT struct objc_method_description protocol_getMethodDescription(Protoco // barrier versions. GTM_INLINE bool OSAtomicCompareAndSwapPtrBarrier(void *predicate, void *replacement, - volatile void *theValue) { + void * volatile *theValue) { #if defined(__LP64__) && __LP64__ return OSAtomicCompareAndSwap64Barrier((int64_t)predicate, (int64_t)replacement, @@ -86,21 +86,24 @@ GTM_INLINE bool OSAtomicCompareAndSwapPtrBarrier(void *predicate, (int32_t *)theValue); #endif // defined(__LP64__) && __LP64__ } - + +#endif // MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 +#endif // MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 + +#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) || (GTM_IPHONE_DEVICE) + GTM_INLINE BOOL objc_atomicCompareAndSwapGlobalBarrier(id predicate, id replacement, volatile id *objectLocation) { return OSAtomicCompareAndSwapPtrBarrier(predicate, replacement, - objectLocation); + (void * volatile *)objectLocation); } GTM_INLINE BOOL objc_atomicCompareAndSwapInstanceVariableBarrier(id predicate, id replacement, volatile id *objectLocation) { return OSAtomicCompareAndSwapPtrBarrier(predicate, replacement, - objectLocation); + (void * volatile *)objectLocation); } -#endif - -#endif // OBJC2_UNAVAILABLE +#endif // (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) || (GTM_IPHONE_DEVICE) -- cgit v1.2.3