Differences From Artifact [753600fe38]:
- File src/runtime/class.m — part of check-in [3b97fc3cd9] at 2014-01-04 00:24:08 on branch trunk — Update copyright. (user: js, size: 17158) [annotate] [blame] [check-ins using]
To Artifact [e18e9ca229]:
- File
src/runtime/class.m
— part of check-in
[3cd9d0ad69]
at
2014-01-05 22:31:44
on branch trunk
— Change behaviour of class_getMethodImplementation.
It behaves like in the Apple runtime now. (user: js, size: 17886) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
610 611 612 613 614 615 616 | { return cls->instance_size; } IMP class_getMethodImplementation(Class cls, SEL sel) { | > > > > > > > > > > | > > > > > > > > > > > > > > > > > > > > | 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 | { return cls->instance_size; } IMP class_getMethodImplementation(Class cls, SEL sel) { /* * We use a dummy object here so that the normal lookup is used, even * though we don't have an object. Doing so is safe, as objc_msg_lookup * does not access the object, but only its class. * * Just looking it up in the dispatch table could result in returning * NULL instead of the forwarding handler, it would also mean * +[resolveClassMethod:] / +[resolveInstanceMethod:] would not be * called. */ struct { Class isa; } dummy = { cls }; return objc_msg_lookup((id)&dummy, sel); } IMP class_getMethodImplementation_stret(Class cls, SEL sel) { /* * Same as above, but use objc_msg_lookup_stret instead, so that the * correct forwarding handler is returned. */ struct { Class isa; } dummy = { cls }; return objc_msg_lookup_stret((id)&dummy, sel); } const char* class_getMethodTypeEncoding(Class cls, SEL sel) { struct objc_method_list *ml; struct objc_category **cats; |
︙ | ︙ |