aboutsummaryrefslogtreecommitdiff
path: root/DebugUtils
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2012-08-02 22:30:15 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2012-08-02 22:30:15 +0000
commit303bc8fbb608ff53352b4c66938761475126dd81 (patch)
tree06f017ddbf39e329e93f78a5490a39633de1976d /DebugUtils
parentb7436a4da54c1cf8e9d6f16862a12b6a3ac90ae0 (diff)
[Author: mmentovai]
10.8 SDK compatibility for GTM. |Object| is gone in Objective-C 2 in the 10.8 SDK, use |NSObject| instead as for iOS. R=dmaclach,thomasvl APPROVED=thomasvl DELTA=5 (2 added, 0 deleted, 3 changed)
Diffstat (limited to 'DebugUtils')
-rw-r--r--DebugUtils/GTMMethodCheck.m8
1 files changed, 5 insertions, 3 deletions
diff --git a/DebugUtils/GTMMethodCheck.m b/DebugUtils/GTMMethodCheck.m
index 801278c..bbf2cf4 100644
--- a/DebugUtils/GTMMethodCheck.m
+++ b/DebugUtils/GTMMethodCheck.m
@@ -54,9 +54,11 @@ static BOOL ConformsToNSObjectProtocol(Class cls) {
return YES;
}
-// iPhone SDK does not define the |Object| class, so we instead test for the
-// |NSObject| class.
-#if GTM_IPHONE_SDK
+ // iPhone and Mac OS X 10.8 with Obj-C 2 SDKs do not define the |Object|
+ // class, so we instead test for the |NSObject| class.
+#if GTM_IPHONE_SDK || \
+ (__OBJC2__ && defined(MAC_OS_X_VERSION_10_8) && \
+ MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8)
// Iterate through all the protocols |cls| supports looking for NSObject.
if (cls == [NSObject class]
|| class_conformsToProtocol(cls, @protocol(NSObject))) {