[libr] Accept void * for performSelector:withObject:

It's up to the receiver what the object should be.
This commit is contained in:
Bill Currie 2020-03-05 15:00:42 +09:00
parent 59db90d177
commit 2ddfe2ef07
4 changed files with 9 additions and 9 deletions

View File

@ -271,7 +271,7 @@
Iteratively sends #performSelector:withObject: to each contained object.
*/
- (void) makeObjectsPerformSelector: (SEL)selector
withObject: (id)arg;
withObject: (void *)arg;
//\}
@end

View File

@ -20,10 +20,10 @@
- (id) performSelector: (SEL)aSelector;
- (id) performSelector: (SEL)aSelector
withObject: (id)anObject;
withObject: (void *)anObject;
- (id) performSelector: (SEL)aSelector
withObject: (id)anObject
withObject: (id)anotherObject;
withObject: (void *)anObject
withObject: (void *)anotherObject;
- (BOOL) respondsToSelector: (SEL)aSelector;
- (BOOL) conformsToProtocol: (Protocol *)aProtocol;

View File

@ -162,7 +162,7 @@
- (id) objectAtIndex: (unsigned)index
{
if (index >= count) // FIXME: need exceptions
[self error: "-replaceObjectAtIndex:withObject: index out of range"];
[self error: "-objectAtIndex:withObject: index out of range"];
return _objs[index];
}
@ -401,7 +401,7 @@
}
- (void) makeObjectsPerformSelector: (SEL)selector
withObject: (id)anObject
withObject: (void *)anObject
{
local int i;

View File

@ -247,7 +247,7 @@ BOOL (id object) object_is_meta_class = #0;
return msg (self, aSelector);
}
- (id) performSelector: (SEL)aSelector withObject: (id)anObject
- (id) performSelector: (SEL)aSelector withObject: (void *)anObject
{
local IMP msg = nil; // FIXME teach qfcc about noreturn
@ -260,8 +260,8 @@ BOOL (id object) object_is_meta_class = #0;
}
- (id) performSelector: (SEL)aSelector
withObject: (id)anObject
withObject: (id)anotherObject
withObject: (void *)anObject
withObject: (void *)anotherObject
{
local IMP msg;