Example #1
0
void method_exchangeImplementations(Method m1, Method m2)
{
	if (NULL == m1 || NULL == m2) { return; }
	IMP tmp = (IMP)m1->imp;
	m1->imp = m2->imp;
	m2->imp = tmp;
	objc_updateDtableForClassContainingMethod(m1);
	objc_updateDtableForClassContainingMethod(m2);
}
Example #2
0
void
method_exchangeImplementations(Method m1, Method m2)
{
  IMP tmp = (IMP) m1->method_imp;

  m1->method_imp = m2->method_imp;
  m2->method_imp = (objc_imp_gnu) tmp;
  objc_updateDtableForClassContainingMethod(m1);
  objc_updateDtableForClassContainingMethod(m2);
}
Example #3
0
IMP method_setImplementation(Method method, IMP imp)
{
	if (NULL == method) { return (IMP)NULL; }
	IMP old = (IMP)method->imp;
	method->imp = old;
	objc_updateDtableForClassContainingMethod(method);
	return old;
}
Example #4
0
IMP
method_setImplementation(Method method, IMP imp)
{
  if (0 == method)
    {
      return (IMP)0;
    }
  else
    {
      IMP old = (IMP) method->method_imp;

      method->method_imp = (objc_imp_gnu) old;
      objc_updateDtableForClassContainingMethod(method);
      return old;
    }
}