[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. Iteratively sends #performSelector:withObject: to each contained object.
*/ */
- (void) makeObjectsPerformSelector: (SEL)selector - (void) makeObjectsPerformSelector: (SEL)selector
withObject: (id)arg; withObject: (void *)arg;
//\} //\}
@end @end

View file

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

View file

@ -162,7 +162,7 @@
- (id) objectAtIndex: (unsigned)index - (id) objectAtIndex: (unsigned)index
{ {
if (index >= count) // FIXME: need exceptions 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]; return _objs[index];
} }
@ -401,7 +401,7 @@
} }
- (void) makeObjectsPerformSelector: (SEL)selector - (void) makeObjectsPerformSelector: (SEL)selector
withObject: (id)anObject withObject: (void *)anObject
{ {
local int i; local int i;

View file

@ -247,7 +247,7 @@ BOOL (id object) object_is_meta_class = #0;
return msg (self, aSelector); 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 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 - (id) performSelector: (SEL)aSelector
withObject: (id)anObject withObject: (void *)anObject
withObject: (id)anotherObject withObject: (void *)anotherObject
{ {
local IMP msg; local IMP msg;