Differences From Artifact [3f90a22e50]:
- File
src/runtime/class.m
— part of check-in
[7c0fa1fa85]
at
2014-01-13 13:28:19
on branch trunk
— Remove class_isKindOfClass().
This was never used and is not part of the Apple runtime either. (user: js, size: 17709) [annotate] [blame] [check-ins using]
To Artifact [dff5c1b4fe]:
- File
src/runtime/class.m
— part of check-in
[52c0e9f94e]
at
2014-02-13 16:29:25
on branch trunk
— runtime/class.m: Better handling of Nil parameters
This matches the behaviour of the Apple runtime. (user: js, size: 18038) [annotate] [blame] [check-ins using]
︙ | |||
574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 | 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 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 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 | + + + + + + + + + + + + - - + + + + + - - + + + + + + + + | return ret; } bool class_isMetaClass(Class cls) { if (cls == Nil) return false; return (cls->info & OBJC_CLASS_INFO_METACLASS); } const char* class_getName(Class cls) { if (cls == Nil) return ""; return cls->name; } Class class_getSuperclass(Class cls) { if (cls == Nil) return nil; return cls->superclass; } unsigned long class_getInstanceSize(Class cls) { if (cls == Nil) return 0; 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. */ |
︙ | |||
747 748 749 750 751 752 753 | 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 | - + + + + + + - + + + + + + - + | return NULL; } Class object_getClass(id obj_) { |
︙ |