Configurable logging (LogTo).
Added "my_" prefix to category method names.
Added MurmurHash.
Added UniqueWindowController.
Bug fixes.
5 // Created by Jens Alfke on 2/11/08.
6 // Copyright 2008 Jens Alfke. All rights reserved.
12 NSInvocation* _mktarget( id rcvr, SEL action )
14 NSMethodSignature *sig = [rcvr methodSignatureForSelector: action];
15 CAssert(sig,@"%@<%p> does not respond to %@",[rcvr class],rcvr,NSStringFromSelector(action));
16 CAssert(sig.numberOfArguments==3,
17 @"-[%@ %@] can't be used as a target because it takes >1 param",
18 [rcvr class],NSStringFromSelector(action));
19 CAssert(0==strcmp([sig getArgumentTypeAtIndex: 2],"@"),
20 @"-[%@ %@] can't be used as a target because it takes a non-object param",
21 [rcvr class],NSStringFromSelector(action));
22 NSInvocation *inv = [NSInvocation invocationWithMethodSignature: sig];
24 inv.selector = action;
29 id $calltarget( NSInvocation *target, id param )
32 if( target && target.target ) {
35 [target setArgument: ¶m atIndex: 2];
38 NSMethodSignature *sig = target.methodSignature;
39 NSUInteger returnLength = sig.methodReturnLength;
40 if( returnLength==0 ) {
43 const char *returnType = sig.methodReturnType;
44 if( returnType[0]=='@' ) {
45 [target getReturnValue: &result];
47 UInt8 returnBuffer[returnLength];
48 [target getReturnValue: &returnBuffer];
49 result = [NSValue valueWithBytes: &returnBuffer objCType: returnType];