1//--------------------------------------------------------------------------------------- 2// $Id$ 3// Copyright (c) 2010 by Mulle Kybernetik. See License file for details. 4//--------------------------------------------------------------------------------------- 5 6#import "OCMBlockCaller.h" 7 8#if NS_BLOCKS_AVAILABLE 9 10@implementation OCMBlockCaller 11 12-(id)initWithCallBlock:(void (^)(NSInvocation *))theBlock 13{ 14 self = [super init]; 15 block = [theBlock copy]; 16 return self; 17} 18 19-(void)dealloc 20{ 21 [block release]; 22 [super dealloc]; 23} 24 25- (void)handleInvocation:(NSInvocation *)anInvocation 26{ 27 block(anInvocation); 28} 29 30@end 31 32#endif 33