Yeah, that's fair... Not sure what you mean by unboxing the return value; if there is going to be a return value, it will have to be a signal.

Sent from my iPhone

On Apr 11, 2013, at 9:37 PM, Justin Spahr-Summers <notifications@github.com> wrote:

> In ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACLifting.m:
> 
> > +	NSMutableArray *arguments = [NSMutableArray arrayWithCapacity:argumentsCount];
> > +
> > +	// First two arguments are self and selector.
> > +	for (NSUInteger i = 2; i < signature.numberOfArguments; i++) {
> > +		id argument = [anInvocation rac_argumentAtIndex:i];
> > +		[arguments addObject:argument ?: RACTupleNil.tupleNil];
> > +	}
> > +
> > +	__autoreleasing id returnValue = [_target rac_liftSelector:anInvocation.selector withObjectsArray:arguments];
> > +
> > +	const char *returnType = signature.methodReturnType;
> > +	if (signature.methodReturnLength > 0) {
> > +		if (strcmp(returnType, "@") == 0 || strcmp(returnType, "#") == 0) {
> > +			[anInvocation setReturnValue:&returnValue];
> > +		} else {
> > +			[anInvocation setReturnValue:&(void *){ NULL }];
> My main concern is that we're providing a false sense of security/correctness here. It seems to work with some return values, but will blow up randomly on values larger than the size of a pointer.
> 
> I'd at least like to make it consistently garbage if we go that route. Alternatively, couldn't this unbox returnValue with logic similar to -rac_setArgument:atIndex:.
> 
> —
> Reply to this email directly or view it on GitHub.