diff --git a/ChangeLog b/ChangeLog index dc25714d8..6c7003dd8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-07-01 David Ayers + + * Headers/Foundation/NSMethodSignature.h + * Source/NSMethodSignature.m + * Source/GSFFCallInvocation.m + * Source/GSFFIInvocation.m: Revert last mframe patch. + 2004-07-02 Fred Kiefer * Source/NSTimeZone.m: Define structure ttinfo as packed to get it diff --git a/Headers/Foundation/NSMethodSignature.h b/Headers/Foundation/NSMethodSignature.h index 49a66d554..1fabd1eda 100644 --- a/Headers/Foundation/NSMethodSignature.h +++ b/Headers/Foundation/NSMethodSignature.h @@ -81,7 +81,6 @@ typedef struct { #else NSArgumentInfo *_info; #endif - const char *_internalMethodTypes; } /** diff --git a/Source/GSFFCallInvocation.m b/Source/GSFFCallInvocation.m index abe837e0d..226ded052 100644 --- a/Source/GSFFCallInvocation.m +++ b/Source/GSFFCallInvocation.m @@ -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:)); diff --git a/Source/GSFFIInvocation.m b/Source/GSFFIInvocation.m index d461be555..89f627511 100644 --- a/Source/GSFFIInvocation.m +++ b/Source/GSFFIInvocation.m @@ -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:)); diff --git a/Source/NSMethodSignature.m b/Source/NSMethodSignature.m index aa5cb529b..c9fcc9471 100644 --- a/Source/NSMethodSignature.m +++ b/Source/NSMethodSignature.m @@ -28,8 +28,7 @@ #include "config.h" #include "GNUstepBase/preface.h" -#include "mframe.h" -#include +#include #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(),