From 303bc8fbb608ff53352b4c66938761475126dd81 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Thu, 2 Aug 2012 22:30:15 +0000 Subject: [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) --- DebugUtils/GTMMethodCheck.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'DebugUtils') 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))) { -- cgit v1.2.3