mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Tidied code
This commit is contained in:
parent
f381b5f09b
commit
6ae48bd3d3
1 changed files with 15 additions and 9 deletions
|
@ -41,22 +41,24 @@
|
|||
if (((self = [super init])) != nil)
|
||||
{
|
||||
[inv retainArguments];
|
||||
_invocation = [inv retain];
|
||||
_invocation = RETAIN(inv);
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithTarget: (id)target selector: (SEL)aSelector object: (id)arg
|
||||
{
|
||||
NSMethodSignature *methodSignature;
|
||||
NSInvocation *inv;
|
||||
NSMethodSignature *methodSignature;
|
||||
NSInvocation *inv;
|
||||
|
||||
methodSignature = [target methodSignatureForSelector: aSelector];
|
||||
inv = [NSInvocation invocationWithMethodSignature: methodSignature];
|
||||
[inv setTarget: target];
|
||||
[inv setSelector: aSelector];
|
||||
if ([methodSignature numberOfArguments] > 2)
|
||||
[inv setArgument: &arg atIndex: 2];
|
||||
{
|
||||
[inv setArgument: &arg atIndex: 2];
|
||||
}
|
||||
return [self initWithInvocation: inv];
|
||||
}
|
||||
|
||||
|
@ -65,16 +67,20 @@
|
|||
if (![self isCancelled])
|
||||
{
|
||||
NS_DURING
|
||||
[_invocation invoke];
|
||||
{
|
||||
[_invocation invoke];
|
||||
}
|
||||
NS_HANDLER
|
||||
_exception = [localException copy];
|
||||
{
|
||||
ASSIGN(_exception, localException);
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
}
|
||||
}
|
||||
|
||||
- (NSInvocation *) invocation
|
||||
{
|
||||
return [[_invocation retain] autorelease];
|
||||
return AUTORELEASE(RETAIN(_invocation));
|
||||
}
|
||||
|
||||
- (id) result
|
||||
|
@ -123,8 +129,8 @@
|
|||
|
||||
- (void) dealloc
|
||||
{
|
||||
[_invocation release];
|
||||
[_exception release];
|
||||
DESTROY(_invocation);
|
||||
DESTROY(_exception);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue