diff --git a/ChangeLog b/ChangeLog index f00ca4c82..3691d63a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-03-31 Richard Frith-Macdonald + + * Headers/Foundation/NSInvocation.h: + * Source/NSInvocation.m: + Remove unused private method pointed out by David Chisnall. + 2009-03-31 Richard Frith-Macdonald * Headers/Foundation/NSDebug.h: diff --git a/Headers/Foundation/NSInvocation.h b/Headers/Foundation/NSInvocation.h index ba2c253d4..7eca3b294 100644 --- a/Headers/Foundation/NSInvocation.h +++ b/Headers/Foundation/NSInvocation.h @@ -120,7 +120,6 @@ extern "C" { - (id) initWithArgframe: (arglist_t)frame selector: (SEL)aSelector; - (id) initWithMethodSignature: (NSMethodSignature*)aSignature; - (id) initWithSelector: (SEL)aSelector; -- (id) initWithTarget: (id)anObject selector: (SEL)aSelector, ...; - (void*) returnFrame: (arglist_t)argFrame; @end diff --git a/Source/NSInvocation.m b/Source/NSInvocation.m index 5a1a7e2b4..0f31405f9 100644 --- a/Source/NSInvocation.m +++ b/Source/NSInvocation.m @@ -923,7 +923,8 @@ _arg_addr(NSInvocation *inv, int index) types = sel_get_type(aSelector); if (types == 0) { - types = sel_get_type(sel_get_any_typed_uid(GSNameFromSelector(aSelector))); + types + = sel_get_type(sel_get_any_typed_uid(GSNameFromSelector(aSelector))); } if (types == 0) { @@ -936,113 +937,6 @@ _arg_addr(NSInvocation *inv, int index) return [self initWithMethodSignature: newSig]; } -/** - * Initialises the receiver with the specified target, selector, and - * a variable number of arguments. - */ -- (id) initWithTarget: anObject selector: (SEL)aSelector, ... -{ - va_list ap; - NSMethodSignature *newSig; - - if (anObject) - { - newSig = [anObject methodSignatureForSelector: aSelector]; - self = [self initWithMethodSignature: newSig]; - } - else - { - self = [self initWithSelector: aSelector]; - } - if (self) - { - unsigned int i; - - [self setTarget: anObject]; - [self setSelector: aSelector]; - va_start (ap, aSelector); - for (i = 3; i <= _numArgs; i++) - { - const char *type = _info[i].type; - unsigned size = _info[i].size; - void *datum; - - datum = _arg_addr(self, i-1); - -#define CASE_TYPE(_C,_T) case _C: *(_T*)datum = va_arg (ap, _T); break - switch (*type) - { - case _C_ID: - *(id*)datum = va_arg (ap, id); - if (_argsRetained) - { - IF_NO_GC(RETAIN(*(id*)datum)); - } - break; - case _C_CHARPTR: - *(char**)datum = va_arg (ap, char*); - if (_argsRetained) - { - char *old = *(char**)datum; - - if (old != 0) - { - char *tmp; - - tmp = NSZoneMalloc(NSDefaultMallocZone(),strlen(old)+1); - strcpy(tmp, old); - *(char**)datum = tmp; - } - } - break; - CASE_TYPE(_C_CLASS, Class); - CASE_TYPE(_C_SEL, SEL); - CASE_TYPE(_C_LNG, long); - CASE_TYPE(_C_ULNG, unsigned long); - CASE_TYPE(_C_INT, NSInteger); - CASE_TYPE(_C_UINT, NSUInteger); - case _C_SHT: - *(short*)datum = (short)va_arg(ap, NSInteger); - break; - case _C_USHT: - *(unsigned short*)datum = (unsigned short)va_arg(ap, NSInteger); - break; - case _C_CHR: - *(char*)datum = (char)va_arg(ap, NSInteger); - break; - case _C_UCHR: - *(unsigned char*)datum = (unsigned char)va_arg(ap, NSInteger); - break; - case _C_FLT: - *(float*)datum = (float)va_arg(ap, double); - break; - CASE_TYPE(_C_DBL, double); - CASE_TYPE(_C_PTR, void*); - case _C_STRUCT_B: - default: -#if !defined(USE_LIBFFI) && !defined(USE_FFCALL) -#if defined(sparc) || defined(powerpc) - /* FIXME: This only appears on sparc and ppc machines so far. - structures appear to be aligned on word boundaries. - Hopefully there is a more general way to figure this out */ - size = (size * Provides a return frame that the ObjectiveC runtime can use to