mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
* Headers/Foundation/NSMethodSignature.h
* Source/NSMethodSignature.m * Source/GSFFCallInvocation.m * Source/GSFFIInvocation.m: Revert last mframe patch. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@19667 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8116e182ce
commit
1e7e1572e2
5 changed files with 11 additions and 56 deletions
|
@ -1,3 +1,10 @@
|
|||
2004-07-01 David Ayers <d.ayers@inode.at>
|
||||
|
||||
* Headers/Foundation/NSMethodSignature.h
|
||||
* Source/NSMethodSignature.m
|
||||
* Source/GSFFCallInvocation.m
|
||||
* Source/GSFFIInvocation.m: Revert last mframe patch.
|
||||
|
||||
2004-07-02 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSTimeZone.m: Define structure ttinfo as packed to get it
|
||||
|
|
|
@ -81,7 +81,6 @@ typedef struct {
|
|||
#else
|
||||
NSArgumentInfo *_info;
|
||||
#endif
|
||||
const char *_internalMethodTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -774,7 +774,6 @@ GSInvocationCallback (void *callback_data, va_alist args)
|
|||
int i;
|
||||
int num_args;
|
||||
void *retval;
|
||||
const char *selectorName;
|
||||
vacallReturnTypeInfo *typeinfo;
|
||||
NSArgumentInfo *info;
|
||||
GSFFCallInvocation *invocation;
|
||||
|
@ -796,24 +795,6 @@ GSInvocationCallback (void *callback_data, va_alist args)
|
|||
obj = va_arg_ptr(args, id);
|
||||
selector = va_arg_ptr(args, SEL);
|
||||
|
||||
/* Fetch the selector from the runtime
|
||||
to get the portable type information later. */
|
||||
selectorName = sel_get_name(selector);
|
||||
selector = sel_get_uid(selectorName);
|
||||
|
||||
if (!selector)
|
||||
{
|
||||
/* The selector is not registered with the runtime. It seems
|
||||
safe to assume that the receiver does not respond to it which
|
||||
would happen if we created a selector with the 'correct' types
|
||||
and registered it manually. So let us raise the corresponding
|
||||
exception. */
|
||||
[NSException raise: NSGenericException
|
||||
format: @"%s does not recognize %s",
|
||||
GSClassNameFromObject(obj),
|
||||
selectorName ? selectorName : "(null)"];
|
||||
}
|
||||
|
||||
fwdInvMethod = gs_method_for_receiver_and_selector
|
||||
(obj, @selector (forwardInvocation:));
|
||||
|
||||
|
|
|
@ -406,7 +406,6 @@ GSFFIInvocationCallback(ffi_cif *cif, void *retp, void **args, void *user)
|
|||
{
|
||||
id obj;
|
||||
SEL selector;
|
||||
const char *selectorName;
|
||||
GSFFIInvocation *invocation;
|
||||
NSMethodSignature *sig;
|
||||
GSMethod fwdInvMethod;
|
||||
|
@ -414,23 +413,6 @@ GSFFIInvocationCallback(ffi_cif *cif, void *retp, void **args, void *user)
|
|||
obj = *(id *)args[0];
|
||||
selector = *(SEL *)args[1];
|
||||
|
||||
/* Fetch the selector from the runtime
|
||||
to get the portable type information later. */
|
||||
selectorName = sel_get_name(selector);
|
||||
selector = sel_get_uid(selectorName);
|
||||
|
||||
if (!selector)
|
||||
{
|
||||
/* The selector is not registered with the runtime. It seems
|
||||
safe to assume that the receiver does not respond to it which
|
||||
would happen if we created a selector with the 'correct' types
|
||||
and registered it manually. So let us raise the corresponding
|
||||
exception. */
|
||||
[NSException raise: NSGenericException
|
||||
format: @"%s does not recognize %s",
|
||||
GSClassNameFromObject(obj),
|
||||
selectorName ? selectorName : "(null)"];
|
||||
}
|
||||
fwdInvMethod = gs_method_for_receiver_and_selector
|
||||
(obj, @selector (forwardInvocation:));
|
||||
|
||||
|
|
|
@ -28,8 +28,7 @@
|
|||
|
||||
#include "config.h"
|
||||
#include "GNUstepBase/preface.h"
|
||||
#include "mframe.h"
|
||||
#include <string.h>
|
||||
#include <mframe.h>
|
||||
|
||||
#include "Foundation/NSMethodSignature.h"
|
||||
#include "Foundation/NSException.h"
|
||||
|
@ -38,15 +37,6 @@
|
|||
|
||||
@implementation NSMethodSignature
|
||||
|
||||
/**
|
||||
* Returns a method signature with the corresponding ObjC types. This
|
||||
* type string must correspond to a type string recognized by the
|
||||
* runtime which is a platform independent representation. Internally
|
||||
* this is transformed to a platform specific representation used
|
||||
* to generate the NSArgumentInfo structures. You should never need
|
||||
* to access this internal representation and it should not be passed
|
||||
* to this method.
|
||||
*/
|
||||
+ (NSMethodSignature*) signatureWithObjCTypes: (const char*)t
|
||||
{
|
||||
NSMethodSignature *newMs;
|
||||
|
@ -56,10 +46,8 @@
|
|||
return nil;
|
||||
}
|
||||
newMs = AUTORELEASE([NSMethodSignature alloc]);
|
||||
newMs->_methodTypes = NSZoneMalloc(NSDefaultMallocZone(), strlen(t) + 1);
|
||||
strcpy ((char *)newMs->_methodTypes, t);
|
||||
newMs->_internalMethodTypes
|
||||
= mframe_build_signature(t, &newMs->_argFrameLength, &newMs->_numArgs, 0);
|
||||
newMs->_methodTypes = mframe_build_signature(t, &newMs->_argFrameLength,
|
||||
&newMs->_numArgs, 0);
|
||||
|
||||
return newMs;
|
||||
}
|
||||
|
@ -133,8 +121,6 @@
|
|||
{
|
||||
if (_methodTypes)
|
||||
NSZoneFree(NSDefaultMallocZone(), (void*)_methodTypes);
|
||||
if (_internalMethodTypes)
|
||||
NSZoneFree(NSDefaultMallocZone(), (void*)_internalMethodTypes);
|
||||
if (_info)
|
||||
NSZoneFree(NSDefaultMallocZone(), (void*)_info);
|
||||
[super dealloc];
|
||||
|
@ -182,7 +168,7 @@
|
|||
{
|
||||
if (_info == 0)
|
||||
{
|
||||
const char *types = _internalMethodTypes;
|
||||
const char *types = _methodTypes;
|
||||
unsigned int i;
|
||||
|
||||
_info = NSZoneMalloc(NSDefaultMallocZone(),
|
||||
|
|
Loading…
Reference in a new issue