ObjFW  Diff

Differences From Artifact [9e1fe8b99e]:

To Artifact [415251c564]:


766
767
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
766
767
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







-
-
+
+

-
+
+







-

-
+

+
+



-
-
+
+







	methodList->methods[0].implementation = implementation;

	class->methodList = methodList;

	objc_update_dtable(class);
}

const char *
class_getMethodTypeEncoding(Class class, SEL selector)
Method
class_getInstanceMethod(Class class, SEL selector)
{
	struct objc_method *method;
	Method method;
	Class superclass;

	if (class == Nil)
		return NULL;

	objc_global_mutex_lock();

	if ((method = getMethod(class, selector)) != NULL) {
		const char *ret = method->selector.typeEncoding;
		objc_global_mutex_unlock();
		return ret;
		return method;
	}

	superclass = class->superclass;

	objc_global_mutex_unlock();

	if (class->superclass != Nil)
		return class_getMethodTypeEncoding(class->superclass, selector);
	if (superclass != Nil)
		return class_getInstanceMethod(superclass, selector);

	return NULL;
}

bool
class_addMethod(Class class, SEL selector, IMP implementation,
    const char *typeEncoding)