Skip to content

Commit

Permalink
Merge pull request tonymillion#30 from ddrscott/patch-1
Browse files Browse the repository at this point in the history
use Apple's flag instead of reinventing the wheel
  • Loading branch information
tonymillion committed Feb 6, 2013
2 parents 530af97 + d2e0756 commit 2b141b0
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions Reachability.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,13 @@
/**
* Does ARC support support GCD objects?
* It does if the minimum deployment target is iOS 6+ or Mac OS X 8+
*
* @see http://opensource.apple.com/source/libdispatch/libdispatch-228.18/os/object.h
**/
#if TARGET_OS_IPHONE

// Compiling for iOS

#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000 // iOS 6.0 or later
#define NEEDS_DISPATCH_RETAIN_RELEASE 0
#else // iOS 5.X or earlier
#define NEEDS_DISPATCH_RETAIN_RELEASE 1
#endif

#else

// Compiling for Mac OS X

#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 // Mac OS X 10.8 or later
#if OS_OBJECT_USE_OBJC
#define NEEDS_DISPATCH_RETAIN_RELEASE 0
#else
#define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
#endif

#define NEEDS_DISPATCH_RETAIN_RELEASE 1
#endif


Expand Down

0 comments on commit 2b141b0

Please sign in to comment.