Permalink
Browse files

Fix for ARC

  • Loading branch information...
1 parent e3b8cf1 commit 90f02321dd177307f9d1bb00fa76e27343e67c17 @hatfinch committed Oct 3, 2011
Showing with 18 additions and 2 deletions.
  1. +18 −2 DGKVOBlocksObserver.m
View
@@ -30,11 +30,17 @@
static NSString *const DGKVOBlocksObservationContext = @"DGKVOBlocksObservationContext";
+#if __has_feature(objc_arc)
+#define DGKVOBlocksObservationContext ((__bridge void *)DGKVOBlocksObservationContext)
+#endif
+
//***************************************************************************
@implementation DGKVOBlocksObserver
-
-@synthesize queue = _queue, block = _block;
+{
+ NSOperationQueue *_queue;
+ DGKVOObserverBlock _block;
+}
+ (id)observerWithQueue:(NSOperationQueue *)queue block:(DGKVOObserverBlock)block
{
@@ -79,6 +85,16 @@ - (void *)context
return DGKVOBlocksObservationContext;
}
+- (NSOperationQueue *)queue
+{
+ return _queue;
+}
+
+- (DGKVOObserverBlock)block
+{
+ return _block;
+}
+
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
if (context == DGKVOBlocksObservationContext) {

0 comments on commit 90f0232

Please sign in to comment.