diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-08-11 18:30:29 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-08-11 18:30:29 +0000 |
commit | 1ddb352f1d7621deeb93848dedf034dc5d271a1f (patch) | |
tree | 0e3c060f447f687396ac3bb416cf02ae3b671f42 /Foundation/GTMObjC2Runtime.h | |
parent | a4a6a27c10d9d78034c759678be0ebf95ff3d76c (diff) |
[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)
Diffstat (limited to 'Foundation/GTMObjC2Runtime.h')
-rw-r--r-- | Foundation/GTMObjC2Runtime.h | 17 |
1 files changed, 10 insertions, 7 deletions
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) |