mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
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:
parent
c5ccc27038
commit
1996a609cc
7 changed files with 781 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue