Revision: 562
Author: gtm.daemon
Date: Thu Aug 2 15:30:15 2012
Log: [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)
http://code.google.com/p/google-toolbox-for-mac/source/detail?r=562
Modified:
/trunk/DebugUtils/GTMMethodCheck.m
=======================================
--- /trunk/DebugUtils/GTMMethodCheck.m Wed Jun 20 14:00:18 2012
+++ /trunk/DebugUtils/GTMMethodCheck.m Thu Aug 2 15:30:15 2012
@@ -54,9 +54,11 @@
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))) {