Differences From Artifact [6afd10fb87]:
- File src/OFObject.m — part of check-in [4b637f8516] at 2012-12-26 14:10:34 on branch trunk — Add OFSystemInfo. (user: js, size: 24727) [annotate] [blame] [check-ins using]
To Artifact [2afc930247]:
- File
src/OFObject.m
— part of check-in
[0389649320]
at
2012-12-30 00:19:56
on branch trunk
— -[performSelector:]: Never call NULL.
When the selector is not recognized, call -[doesNotRecognizeSelector:]. (user: js, size: 24955) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 | return class_getMethodImplementation(object_getClass(self), selector); } - (id)performSelector: (SEL)selector { id (*imp)(id, SEL) = (id(*)(id, SEL))[self methodForSelector: selector]; return imp(self, selector); } - (id)performSelector: (SEL)selector withObject: (id)object { id (*imp)(id, SEL, id) = (id(*)(id, SEL, id))[self methodForSelector: selector]; return imp(self, selector, object); } - (id)performSelector: (SEL)selector withObject: (id)object1 withObject: (id)object2 { id (*imp)(id, SEL, id, id) = (id(*)(id, SEL, id, id))[self methodForSelector: selector]; return imp(self, selector, object1, object2); } - (void)performSelector: (SEL)selector afterDelay: (double)delay { void *pool = objc_autoreleasePoolPush(); | > > > > > > > > > | 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 | return class_getMethodImplementation(object_getClass(self), selector); } - (id)performSelector: (SEL)selector { id (*imp)(id, SEL) = (id(*)(id, SEL))[self methodForSelector: selector]; if OF_UNLIKELY (imp == NULL) [self doesNotRecognizeSelector: selector]; return imp(self, selector); } - (id)performSelector: (SEL)selector withObject: (id)object { id (*imp)(id, SEL, id) = (id(*)(id, SEL, id))[self methodForSelector: selector]; if OF_UNLIKELY (imp == NULL) [self doesNotRecognizeSelector: selector]; return imp(self, selector, object); } - (id)performSelector: (SEL)selector withObject: (id)object1 withObject: (id)object2 { id (*imp)(id, SEL, id, id) = (id(*)(id, SEL, id, id))[self methodForSelector: selector]; if OF_UNLIKELY (imp == NULL) [self doesNotRecognizeSelector: selector]; return imp(self, selector, object1, object2); } - (void)performSelector: (SEL)selector afterDelay: (double)delay { void *pool = objc_autoreleasePoolPush(); |
︙ | ︙ |