2 // CHOMPIterationCollectEnumerator.m
5 // Created by Michael Ash on 12/16/04.
8 #import "CHOMPEnumeratorCollectTrampoline.h"
11 @implementation CHOMPEnumeratorCollectTrampoline
13 - (void)prepareWithInvocation:(NSInvocation *)invocation
15 if([target isKindOfClass:[NSSet class]])
16 returnCollection = [[NSMutableSet alloc] init];
18 returnCollection = [[NSMutableArray alloc] init];
21 - (void)processReturnValue:retVal
24 retVal = [NSNull null];
25 [returnCollection addObject:retVal];
30 return returnCollection;
33 - (void)finalizeWithInvocation:(NSInvocation *)invocation
35 // autorelease because we're returning it and it can't disappear right away
36 [returnCollection autorelease];
37 returnCollection = nil;
42 [returnCollection release];