//
//  KWFutureObject.h
//  iOSFalconCore
//
//  Created by Luke Redpath on 13/01/2011.
//  Copyright 2011 LJR Software Limited. All rights reserved.
//

#import <Foundation/Foundation.h>

#ifdef __weak
#undef __weak
#define __weak __unsafe_unretained
#endif

typedef id (^KWFutureObjectBlock)(void);

@interface KWFutureObject : NSObject {
  __weak id *objectPointer;
  KWFutureObjectBlock block;
}
+ (id)objectWithObjectPointer:(id *)pointer;
+ (id)objectWithReturnValueOfBlock:(KWFutureObjectBlock)block;
- (id)initWithObjectPointer:(id *)pointer;
- (id)initWithBlock:(KWFutureObjectBlock)aBlock;
- (id)object;
@end

//
//  KWFutureObject.h
//  iOSFalconCore
//
//  Created by Luke Redpath on 13/01/2011.
//  Copyright 2011 LJR Software Limited. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef id (^KWFutureObjectBlock)(void);

@interface KWFutureObject : NSObject {
  __weak id *objectPointer;
  KWFutureObjectBlock block;
}
+ (id)objectWithObjectPointer:(id *)pointer;
+ (id)objectWithReturnValueOfBlock:(KWFutureObjectBlock)block;
- (id)initWithObjectPointer:(id *)pointer;
- (id)initWithBlock:(KWFutureObjectBlock)aBlock;
- (id)object;
@end

--- 
+++ 
@@ -7,6 +7,11 @@
 //
 
 #import <Foundation/Foundation.h>
+
+#ifdef __weak
+#undef __weak
+#define __weak __unsafe_unretained
+#endif
 
 typedef id (^KWFutureObjectBlock)(void);
 
Work arounf use of weak when deployment target it iOS 4
