Frith-MacDonald and other patches.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2801 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fedor 1998-05-21 13:41:55 +00:00
parent 09326f7e16
commit bc4aeb0fcc
7 changed files with 781 additions and 14 deletions

View file

@ -246,7 +246,6 @@ extraRefCount (id anObject)
(object_is_instance(self) ?
class_get_instance_method(self->isa, aSelector)
: class_get_class_method(self->isa, aSelector));
return mth ? [NSMethodSignature signatureWithObjCTypes:mth->method_types]
: nil;
}
@ -275,21 +274,24 @@ extraRefCount (id anObject)
- (retval_t) forward:(SEL)aSel :(arglist_t)argFrame
{
#if 1
[self doesNotRecognizeSelector:aSel];
return NULL;
#else
void *retFrame;
NSMethodSignature *ms = [self methodSignatureForSelector:aSel];
NSInvocation *inv = [NSInvocation invocationWithMethodSignature:ms
frame:argFrame];
NSMethodSignature *sig;
NSInvocation *inv;
int retLength;
inv = [[[NSInvocation alloc] initWithArgframe: argFrame
selector: aSel] autorelease];
/* is this right? */
retFrame = (void*) alloca([ms methodReturnLength]);
sig = [inv methodSignature];
retLength = [sig methodReturnLength];
/* Make sure we have something even if we are returnign void */
if (retLength == 0)
retLength = sizeof(void*);
retFrame = (void*) alloca(retLength);
[self forwardInvocation:inv];
[inv getReturnValue:retFrame];
/* where do ms and inv get free'd? */
[inv getReturnValue: retFrame];
return retFrame;
#endif
}
- (void) forwardInvocation: (NSInvocation*)anInvocation