ObjFW  Diff

Differences From Artifact [850b7969ab]:

To Artifact [18bfba4e77]:


107
108
109
110
111
112
113
114
115


116
117

118
119
120
121
122

123
124
125
126
127
128
129
107
108
109
110
111
112
113


114
115
116

117

118
119
120

121
122
123
124
125
126
127
128







-
-
+
+

-
+
-



-
+







	if (oldimp == (IMP)0 || newimp == (IMP)0)
		@throw [OFInvalidArgumentException newWithClass: self
						    andSelector: _cmd];

	method->method_imp = newimp;
	return oldimp;
#else
	Method m;
	IMP imp;
	Method method = class_getInstanceMethod(self, selector);
	IMP imp = class_getMethodImplementation(class, selector);

	if ((m = class_getInstanceMethod(self, selector)) == NULL ||
	if (method == NULL || imp == NULL)
	    (imp = method_getImplementation(m)) == NULL)
		@throw [OFInvalidArgumentException newWithClass: self
						    andSelector: _cmd];

	return method_setImplementation(m, imp);
	return method_setImplementation(method, imp);
#endif
}

- init
{
	return self;
}