Permalink
Browse files

fixes

  • Loading branch information...
1 parent 325deca commit f16907b01d00d7ea0caa04d25fb4b5c82db71d6b @stevedekorte committed Sep 15, 2011
Showing with 8 additions and 5 deletions.
  1. +5 −2 ActorKit/BatchProxy.m
  2. +3 −3 ActorKit/NSInvocation+Copy.m
View
@@ -49,11 +49,14 @@ - (void)forwardInvocation:(NSInvocation *)anInvocation
NSStringFromSelector([anInvocation selector])]];
}
+ [anInvocation retain]; // uh, why?
[anInvocation retainArguments];
NSInteger length = [batchTarget count];
id *results = calloc(0, sizeof(id) * length);
-
+
+ // use an invocation pool?
+
dispatch_apply(length, [self batchDispatchQueue],
^(size_t i)
{
@@ -66,7 +69,7 @@ - (void)forwardInvocation:(NSInvocation *)anInvocation
id r;
[copyInvocation getReturnValue:&r];
results[i] = r;
- [copyInvocation release];
+ [copyInvocation release]; // ?
//printf("end %i\n", (int)i);
}
);
@@ -14,14 +14,14 @@ @implementation NSInvocation (NSInvocation_Copy)
- (id)copy
{
NSInvocation *copy = [NSInvocation invocationWithMethodSignature:[self methodSignature]];
- [copy setTarget:[self target]];
- [copy setSelector:[self selector]];
+ //[copy setTarget:[self target]];
+ //[copy setSelector:[self selector]];
char buffer[sizeof(intmax_t)];
NSUInteger argCount = [[self methodSignature] numberOfArguments];
- for (int i = 2; i < argCount; i++)
+ for (int i = 0; i < argCount; i++)
{
[self getArgument:(void *)&buffer atIndex:i];
[copy setArgument:(void *)&buffer atIndex:i];

0 comments on commit f16907b

Please sign in to comment.