Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove uses of NEEDS_DISPATCH_RETAIN_RELEASE. Use OS_OBJECT_USE_OBJC.

According to os/object.h the macro OS_OBJECT_USE_OBJC can be used to determine
if the compilation target supports libSystem objects be used as Obj-C types.
  • Loading branch information...
commit 2e7fe01ecde8da15a8beaf21c3dd1fdf62b2ee34 1 parent b0835be
@drodriguez drodriguez authored
View
30 Core/XMPPModule.m
@@ -6,32 +6,6 @@
#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
#endif
-/**
- * Does ARC support support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-**/
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
// Log levels: off, error, warn, info, verbose
#if DEBUG
static const int xmppLogLevel = XMPP_LOG_LEVEL_WARN;
@@ -60,7 +34,7 @@ - (id)initWithDispatchQueue:(dispatch_queue_t)queue
if (queue)
{
moduleQueue = queue;
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_retain(moduleQueue);
#endif
}
@@ -77,7 +51,7 @@ - (id)initWithDispatchQueue:(dispatch_queue_t)queue
- (void)dealloc
{
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(moduleQueue);
#endif
}
View
36 Core/XMPPParser.m
@@ -11,32 +11,6 @@
#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
#endif
-/**
- * Does ARC support support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-**/
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
// Log levels: off, error, warn, info, verbose
#if DEBUG
static const int xmppLogLevel = XMPP_LOG_LEVEL_VERBOSE;
@@ -725,7 +699,7 @@ - (id)initWithDelegate:(id)aDelegate delegateQueue:(dispatch_queue_t)dq parserQu
delegate = aDelegate;
delegateQueue = dq;
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
if (delegateQueue)
dispatch_retain(delegateQueue);
#endif
@@ -733,7 +707,7 @@ - (id)initWithDelegate:(id)aDelegate delegateQueue:(dispatch_queue_t)dq parserQu
if (pq) {
parserQueue = pq;
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_retain(parserQueue);
#endif
}
@@ -785,7 +759,7 @@ - (void)dealloc
xmlFreeParserCtxt(parserCtxt);
}
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
if (delegateQueue)
dispatch_release(delegateQueue);
if (parserQueue)
@@ -795,7 +769,7 @@ - (void)dealloc
- (void)setDelegate:(id)newDelegate delegateQueue:(dispatch_queue_t)newDelegateQueue
{
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
if (newDelegateQueue)
dispatch_retain(newDelegateQueue);
#endif
@@ -804,7 +778,7 @@ - (void)setDelegate:(id)newDelegate delegateQueue:(dispatch_queue_t)newDelegateQ
delegate = newDelegate;
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
if (delegateQueue)
dispatch_release(delegateQueue);
#endif
View
34 Core/XMPPStream.m
@@ -17,32 +17,6 @@
#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
#endif
-/**
- * Does ARC support support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-**/
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
// Log levels: off, error, warn, info, verbose
#if DEBUG
static const int xmppLogLevel = XMPP_LOG_LEVEL_INFO | XMPP_LOG_FLAG_SEND_RECV; // | XMPP_LOG_FLAG_TRACE;
@@ -277,7 +251,7 @@ - (id)initP2PFrom:(XMPPJID *)jid
**/
- (void)dealloc
{
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(xmppQueue);
dispatch_release(willSendIqQueue);
dispatch_release(willSendMessageQueue);
@@ -2548,7 +2522,7 @@ - (void)continueReceiveIQ:(XMPPIQ *)iq
[self sendElement:iqResponse];
}
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(delSemaphore);
dispatch_release(delGroup);
#endif
@@ -3818,7 +3792,7 @@ - (void)setupKeepAliveTimer
[self keepAlive];
}});
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_source_t theKeepAliveTimer = keepAliveTimer;
dispatch_source_set_cancel_handler(keepAliveTimer, ^{
@@ -4282,7 +4256,7 @@ - (BOOL)wait:(NSTimeInterval)timeout_seconds
- (void)dealloc
{
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(semaphore);
#endif
}
View
28 Extensions/CoreDataStorage/XMPPCoreDataStorage.m
@@ -12,32 +12,6 @@
#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
#endif
-/**
- * Does ARC support support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-**/
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
// Log levels: off, error, warn, info, verbose
#if DEBUG
static const int xmppLogLevel = XMPP_LOG_LEVEL_WARN;
@@ -845,7 +819,7 @@ - (void)dealloc
[[self class] unregisterDatabaseFileName:databaseFileName];
}
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
if (storageQueue)
dispatch_release(storageQueue);
#endif
View
30 Extensions/Reconnect/XMPPReconnect.m
@@ -7,32 +7,6 @@
#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
#endif
-/**
- * Does ARC support support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-**/
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
#define IMPOSSIBLE_REACHABILITY_FLAGS 0xFFFFFFFF
// Log levels: off, error, warn, info, verbose
@@ -412,7 +386,7 @@ - (void)setupReconnectTimer
}});
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_source_t theReconnectTimer = reconnectTimer;
dispatch_source_set_cancel_handler(reconnectTimer, ^{
@@ -641,7 +615,7 @@ - (void)maybeAttemptReconnectWithReachabilityFlags:(SCNetworkReachabilityFlags)r
}});
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(delSemaphore);
dispatch_release(delGroup);
#endif
View
30 Extensions/Roster/MemoryStorage/XMPPRosterMemoryStorage.m
@@ -8,32 +8,6 @@
#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
#endif
-/**
- * Does ARC support support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-**/
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
// Log levels: off, error, warn, info, verbose
#if DEBUG
static const int xmppLogLevel = XMPP_LOG_LEVEL_WARN; // | XMPP_LOG_FLAG_TRACE;
@@ -83,7 +57,7 @@ - (BOOL)configureWithParent:(XMPPRoster *)aParent queue:(dispatch_queue_t)queue
parent = aParent;
parentQueue = queue;
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_retain(parentQueue);
#endif
@@ -96,7 +70,7 @@ - (BOOL)configureWithParent:(XMPPRoster *)aParent queue:(dispatch_queue_t)queue
- (void)dealloc
{
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
if (parentQueue)
dispatch_release(parentQueue);
#endif
View
30 Extensions/XEP-0009/XMPPJabberRPCModule.m
@@ -16,32 +16,6 @@
#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
#endif
-/**
- * Does ARC support support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-**/
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
// Log levels: off, error, warn, info, verbose
// Log flags: trace
#if DEBUG
@@ -83,7 +57,7 @@ - (id)initWithRpcID:(NSString *)aRpcID timer:(dispatch_source_t)aTimer
rpcID = [aRpcID copy];
timer = aTimer;
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_retain(timer);
#endif
}
@@ -105,7 +79,7 @@ - (void)cancelTimer
if (timer)
{
dispatch_source_cancel(timer);
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(timer);
#endif
timer = NULL;
View
2  Extensions/XEP-0016/XMPPPrivacy.m
@@ -971,7 +971,7 @@ - (void)cancel
if (timer)
{
dispatch_source_cancel(timer);
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(timer);
#endif
timer = NULL;
View
28 Extensions/XEP-0045/CoreDataStorage/XMPPRoomCoreDataStorage.m
@@ -7,32 +7,6 @@
#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
#endif
-/**
- * Does ARC support support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-**/
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
// Log levels: off, error, warn, info, verbose
#if DEBUG
static const int xmppLogLevel = XMPP_LOG_LEVEL_WARN; // | XMPP_LOG_FLAG_TRACE;
@@ -427,7 +401,7 @@ - (void)destroyDeleteTimer
if (deleteTimer)
{
dispatch_source_cancel(deleteTimer);
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(deleteTimer);
#endif
deleteTimer = NULL;
View
28 Extensions/XEP-0045/HybridStorage/XMPPRoomHybridStorage.m
@@ -8,32 +8,6 @@
#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
#endif
-/**
- * Does ARC support support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-**/
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
// Log levels: off, error, warn, info, verbose
#if DEBUG
static const int xmppLogLevel = XMPP_LOG_LEVEL_WARN;
@@ -407,7 +381,7 @@ - (void)destroyDeleteTimer
if (deleteTimer)
{
dispatch_source_cancel(deleteTimer);
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(deleteTimer);
#endif
deleteTimer = NULL;
View
30 Extensions/XEP-0045/MemoryStorage/XMPPRoomMemoryStorage.m
@@ -8,32 +8,6 @@
#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
#endif
-/**
- * Does ARC support support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-**/
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
// Log levels: off, error, warn, info, verbose
#if DEBUG
static const int xmppLogLevel = XMPP_LOG_LEVEL_WARN; // | XMPP_LOG_FLAG_TRACE;
@@ -102,7 +76,7 @@ - (BOOL)configureWithParent:(XMPPRoom *)aParent queue:(dispatch_queue_t)queue
parent = aParent;
parentQueue = queue;
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_retain(parentQueue);
#endif
@@ -120,7 +94,7 @@ - (BOOL)configureWithParent:(XMPPRoom *)aParent queue:(dispatch_queue_t)queue
- (void)dealloc
{
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
if (parentQueue)
dispatch_release(parentQueue);
#endif
View
34 Extensions/XEP-0065/TURNSocket.m
@@ -9,32 +9,6 @@
#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
#endif
-/**
- * Does ARC support support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-**/
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
// Log levels: off, error, warn, info, verbose
#if DEBUG
static const int xmppLogLevel = XMPP_LOG_LEVEL_WARN; // | XMPP_LOG_FLAG_TRACE;
@@ -314,7 +288,7 @@ - (void)dealloc
if (discoTimer)
dispatch_source_cancel(discoTimer);
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
if (turnQueue)
dispatch_release(turnQueue);
@@ -362,7 +336,7 @@ - (void)startWithDelegate:(id)aDelegate delegateQueue:(dispatch_queue_t)aDelegat
delegate = aDelegate;
delegateQueue = aDelegateQueue;
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_retain(delegateQueue);
#endif
@@ -1530,7 +1504,7 @@ - (void)cleanup
if (turnTimer)
{
dispatch_source_cancel(turnTimer);
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(turnTimer);
#endif
turnTimer = NULL;
@@ -1539,7 +1513,7 @@ - (void)cleanup
if (discoTimer)
{
dispatch_source_cancel(discoTimer);
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(discoTimer);
#endif
discoTimer = NULL;
View
34 Extensions/XEP-0115/XMPPCapabilities.m
@@ -7,32 +7,6 @@
#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
#endif
-/**
- * Does ARC support support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-**/
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
// Log levels: off, error, warn, info, verbose
// Log flags: trace
#if DEBUG
@@ -1572,7 +1546,7 @@ - (void)setupTimeoutForDiscoRequestFromJID:(XMPPJID *)jid
[self processTimeoutWithJID:jid];
dispatch_source_cancel(timer);
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(timer);
#endif
}});
@@ -1608,7 +1582,7 @@ - (void)setupTimeoutForDiscoRequestFromJID:(XMPPJID *)jid withHashKey:(NSString
[self processTimeoutWithHashKey:key];
dispatch_source_cancel(timer);
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(timer);
#endif
}});
@@ -1685,7 +1659,7 @@ - (id)initWithDispatchTimer:(dispatch_source_t)aTimer
if ((self = [super init]))
{
timer = aTimer;
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_retain(timer);
#endif
}
@@ -1697,7 +1671,7 @@ - (void)cancel
if (timer)
{
dispatch_source_cancel(timer);
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(timer);
#endif
timer = NULL;
View
28 Extensions/XEP-0199/XMPPAutoPing.m
@@ -7,32 +7,6 @@
#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
#endif
-/**
- * Does ARC support support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-**/
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
// Log levels: off, error, warn, info, verbose
// Log flags: trace
#if DEBUG
@@ -366,7 +340,7 @@ - (void)stopPingIntervalTimer
if (pingIntervalTimer)
{
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(pingIntervalTimer);
#endif
pingIntervalTimer = NULL;
View
28 Extensions/XEP-0202/XMPPAutoTime.m
@@ -6,32 +6,6 @@
#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
#endif
-/**
- * Does ARC support support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-**/
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
// Log levels: off, error, warn, info, verbose
// Log flags: trace
#if DEBUG
@@ -383,7 +357,7 @@ - (void)stopRecalibrationTimer
if (recalibrationTimer)
{
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(recalibrationTimer);
#endif
recalibrationTimer = NULL;
View
30 Utilities/GCDMulticastDelegate.m
@@ -10,32 +10,6 @@
#endif
/**
- * Does ARC support support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-**/
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
-/**
* How does this class work?
*
* In theory, this class is very straight-forward.
@@ -513,7 +487,7 @@ - (id)initWithDelegate:(id)inDelegate delegateQueue:(dispatch_queue_t)inDelegate
}
#endif
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
if (delegateQueue)
dispatch_retain(delegateQueue);
#endif
@@ -523,7 +497,7 @@ - (id)initWithDelegate:(id)inDelegate delegateQueue:(dispatch_queue_t)inDelegate
- (void)dealloc
{
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
if (delegateQueue)
dispatch_release(delegateQueue);
#endif
View
32 Utilities/XMPPIDTracker.m
@@ -4,32 +4,6 @@
#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
#endif
-/**
- * Does ARC support support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-**/
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
#define AssertProperQueue() NSAssert(dispatch_get_current_queue() == queue, @"Invoked on incorrect queue")
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -52,7 +26,7 @@ - (id)initWithDispatchQueue:(dispatch_queue_t)aQueue
if ((self = [super init]))
{
queue = aQueue;
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_retain(queue);
#endif
@@ -71,7 +45,7 @@ - (void)dealloc
}
[dict removeAllObjects];
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(queue);
#endif
}
@@ -227,7 +201,7 @@ - (void)cancelTimer
if (timer)
{
dispatch_source_cancel(timer);
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(timer);
#endif
timer = NULL;
View
40 Utilities/XMPPSRVResolver.m
@@ -15,32 +15,6 @@
#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
#endif
-/**
- * Does ARC support support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-**/
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
NSString *const XMPPSRVResolverErrorDomain = @"XMPPSRVResolverErrorDomain";
// Log levels: off, error, warn, info, verbose
@@ -81,14 +55,14 @@ - (id)initWithdDelegate:(id)aDelegate delegateQueue:(dispatch_queue_t)dq resolve
delegate = aDelegate;
delegateQueue = dq;
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_retain(delegateQueue);
#endif
if (rq)
{
resolverQueue = rq;
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_retain(resolverQueue);
#endif
}
@@ -108,7 +82,7 @@ - (void)dealloc
[self stop];
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
if (resolverQueue)
dispatch_release(resolverQueue);
#endif
@@ -536,7 +510,7 @@ - (void)startWithSRVName:(NSString *)aSRVName timeout:(NSTimeInterval)aTimeout
}});
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_source_t theSdReadSource = sdReadSource;
#endif
DNSServiceRef theSdRef = sdRef;
@@ -545,7 +519,7 @@ - (void)startWithSRVName:(NSString *)aSRVName timeout:(NSTimeInterval)aTimeout
XMPPLogVerbose(@"%@: sdReadSource_cancelHandler", THIS_FILE);
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(theSdReadSource);
#endif
DNSServiceRefDeallocate(theSdRef);
@@ -595,7 +569,7 @@ - (void)stop
delegate = nil;
if (delegateQueue)
{
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(delegateQueue);
#endif
delegateQueue = NULL;
@@ -618,7 +592,7 @@ - (void)stop
if (timeoutTimer)
{
dispatch_source_cancel(timeoutTimer);
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(timeoutTimer);
#endif
timeoutTimer = NULL;
View
57 Vendor/CocoaAsyncSocket/GCDAsyncSocket.m
@@ -32,33 +32,6 @@
// For more information see: https://github.com/robbiehanson/CocoaAsyncSocket/wiki/ARC
#endif
-/**
- * Does ARC support support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-**/
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
-
#if 0
// Logging Enabled - See log level below
@@ -1000,7 +973,7 @@ - (id)initWithDelegate:(id)aDelegate delegateQueue:(dispatch_queue_t)dq socketQu
delegate = aDelegate;
delegateQueue = dq;
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
if (dq) dispatch_retain(dq);
#endif
@@ -1018,7 +991,7 @@ - (id)initWithDelegate:(id)aDelegate delegateQueue:(dispatch_queue_t)dq socketQu
@"The given socketQueue parameter must not be a concurrent queue.");
socketQueue = sq;
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_retain(sq);
#endif
}
@@ -1055,12 +1028,12 @@ - (void)dealloc
delegate = nil;
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
if (delegateQueue) dispatch_release(delegateQueue);
#endif
delegateQueue = NULL;
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
if (socketQueue) dispatch_release(socketQueue);
#endif
socketQueue = NULL;
@@ -1139,7 +1112,7 @@ - (void)setDelegateQueue:(dispatch_queue_t)newDelegateQueue synchronously:(BOOL)
{
dispatch_block_t block = ^{
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
if (delegateQueue) dispatch_release(delegateQueue);
if (newDelegateQueue) dispatch_retain(newDelegateQueue);
#endif
@@ -1196,7 +1169,7 @@ - (void)setDelegate:(id)newDelegate delegateQueue:(dispatch_queue_t)newDelegateQ
delegate = newDelegate;
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
if (delegateQueue) dispatch_release(delegateQueue);
if (newDelegateQueue) dispatch_retain(newDelegateQueue);
#endif
@@ -1640,7 +1613,7 @@ - (BOOL)acceptOnInterface:(NSString *)inInterface port:(uint16_t)port error:(NSE
dispatch_source_set_cancel_handler(accept4Source, ^{
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
LogVerbose(@"dispatch_release(accept4Source)");
dispatch_release(acceptSource);
#endif
@@ -1674,7 +1647,7 @@ - (BOOL)acceptOnInterface:(NSString *)inInterface port:(uint16_t)port error:(NSE
dispatch_source_set_cancel_handler(accept6Source, ^{
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
LogVerbose(@"dispatch_release(accept6Source)");
dispatch_release(acceptSource);
#endif
@@ -1811,7 +1784,7 @@ - (BOOL)doAccept:(int)parentSocketFD
}
// Release the socket queue returned from the delegate (it was retained by acceptedSocket)
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
if (childSocketQueue) dispatch_release(childSocketQueue);
#endif
@@ -2566,7 +2539,7 @@ - (void)startConnectTimeout:(NSTimeInterval)timeout
[self doConnectTimeout];
}});
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_source_t theConnectTimer = connectTimer;
dispatch_source_set_cancel_handler(connectTimer, ^{
LogVerbose(@"dispatch_release(connectTimer)");
@@ -3633,7 +3606,7 @@ - (void)setupReadAndWriteSourcesForNewlyConnectedSocket:(int)socketFD
__block int socketFDRefCount = 2;
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_source_t theReadSource = readSource;
dispatch_source_t theWriteSource = writeSource;
#endif
@@ -3642,7 +3615,7 @@ - (void)setupReadAndWriteSourcesForNewlyConnectedSocket:(int)socketFD
LogVerbose(@"readCancelBlock");
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
LogVerbose(@"dispatch_release(readSource)");
dispatch_release(theReadSource);
#endif
@@ -3658,7 +3631,7 @@ - (void)setupReadAndWriteSourcesForNewlyConnectedSocket:(int)socketFD
LogVerbose(@"writeCancelBlock");
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
LogVerbose(@"dispatch_release(writeSource)");
dispatch_release(theWriteSource);
#endif
@@ -5069,7 +5042,7 @@ - (void)setupReadTimerWithTimeout:(NSTimeInterval)timeout
[self doReadTimeout];
}});
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_source_t theReadTimer = readTimer;
dispatch_source_set_cancel_handler(readTimer, ^{
LogVerbose(@"dispatch_release(readTimer)");
@@ -5699,7 +5672,7 @@ - (void)setupWriteTimerWithTimeout:(NSTimeInterval)timeout
[self doWriteTimeout];
}});
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_source_t theWriteTimer = writeTimer;
dispatch_source_set_cancel_handler(writeTimer, ^{
LogVerbose(@"dispatch_release(writeTimer)");
View
30 Vendor/CocoaLumberjack/DDAbstractDatabaseLogger.m
@@ -15,32 +15,6 @@
#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
#endif
-/**
- * Does ARC support support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-**/
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
@interface DDAbstractDatabaseLogger ()
- (void)destroySaveTimer;
- (void)destroyDeleteTimer;
@@ -147,7 +121,7 @@ - (void)destroySaveTimer
dispatch_resume(saveTimer);
saveTimerSuspended = NO;
}
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(saveTimer);
#endif
saveTimer = NULL;
@@ -192,7 +166,7 @@ - (void)destroyDeleteTimer
if (deleteTimer)
{
dispatch_source_cancel(deleteTimer);
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_release(deleteTimer);
#endif
deleteTimer = NULL;
View
27 Vendor/CocoaLumberjack/DDFileLogger.m
@@ -19,31 +19,6 @@
#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
#endif
-// Does ARC support support GCD objects?
-// It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
// We probably shouldn't be using DDLog() statements within the DDLog implementation.
// But we still want to leave our log statements for any future debugging,
// and to allow other developers to trace the implementation (which is a great learning tool).
@@ -673,7 +648,7 @@ - (void)scheduleTimerToRollLogFileDueToAge
}});
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_source_t theRollingTimer = rollingTimer;
dispatch_source_set_cancel_handler(rollingTimer, ^{
dispatch_release(theRollingTimer);
View
31 Vendor/CocoaLumberjack/DDLog.m
@@ -22,31 +22,6 @@
#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
#endif
-// Does ARC support support GCD objects?
-// It does if the minimum deployment target is iOS 6+ or Mac OS X 10.8+
-
-#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
- #define NEEDS_DISPATCH_RETAIN_RELEASE 0
- #else
- #define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
- #endif
-
-#endif
-
// We probably shouldn't be using DDLog() statements within the DDLog implementation.
// But we still want to leave our log statements for any future debugging,
// and to allow other developers to trace the implementation (which is a great learning tool).
@@ -794,7 +769,7 @@ - (id)initWithLogger:(id <DDLogger>)aLogger loggerQueue:(dispatch_queue_t)aLogge
if (aLoggerQueue) {
loggerQueue = aLoggerQueue;
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
dispatch_retain(loggerQueue);
#endif
}
@@ -809,7 +784,7 @@ + (DDLoggerNode *)nodeWithLogger:(id <DDLogger>)logger loggerQueue:(dispatch_que
- (void)dealloc
{
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
if (loggerQueue) dispatch_release(loggerQueue);
#endif
}
@@ -930,7 +905,7 @@ - (id)init
- (void)dealloc
{
- #if NEEDS_DISPATCH_RETAIN_RELEASE
+ #if !OS_OBJECT_USE_OBJC
if (loggerQueue) dispatch_release(loggerQueue);
#endif
}
Please sign in to comment.
Something went wrong with that request. Please try again.