Browse Source

Improved automatic detection of when to use dispatch_retain() and dispatch_release() depending on compiler settings

Pierre-Olivier Latour 11 years ago
parent
commit
17fad0f1b9
1 changed files with 2 additions and 3 deletions
  1. 2 3
      GCDWebServer/Core/GCDWebServerPrivate.h

+ 2 - 3
GCDWebServer/Core/GCDWebServerPrivate.h

@@ -25,8 +25,7 @@
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
  */
 
 
-#import <TargetConditionals.h>
-#import <AvailabilityMacros.h>
+#import <os/object.h>
 
 
 #if __has_feature(objc_arc)
 #if __has_feature(objc_arc)
 #define ARC_BRIDGE __bridge
 #define ARC_BRIDGE __bridge
@@ -35,7 +34,7 @@
 #define ARC_RELEASE(__OBJECT__)
 #define ARC_RELEASE(__OBJECT__)
 #define ARC_AUTORELEASE(__OBJECT__) __OBJECT__
 #define ARC_AUTORELEASE(__OBJECT__) __OBJECT__
 #define ARC_DEALLOC(__OBJECT__)
 #define ARC_DEALLOC(__OBJECT__)
-#if (TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_6_0)) || (!TARGET_OS_IPHONE && (__MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_8))
+#if OS_OBJECT_USE_OBJC_RETAIN_RELEASE
 #define ARC_DISPATCH_RETAIN(__OBJECT__)
 #define ARC_DISPATCH_RETAIN(__OBJECT__)
 #define ARC_DISPATCH_RELEASE(__OBJECT__)
 #define ARC_DISPATCH_RELEASE(__OBJECT__)
 #else
 #else