some small fixups

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36616 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2013-05-13 07:09:41 +00:00
parent 891d7e0f24
commit 360e1f6ec6
5 changed files with 66 additions and 66 deletions

View file

@ -575,16 +575,22 @@ IMP
class_replaceMethod(Class cls, SEL name, IMP imp, const char *types)
{
Method method = class_getInstanceMethodNonrecursive(cls, name);
IMP old;
if (method == NULL)
{
class_addMethod(cls, name, imp, types);
return NULL;
}
old = (IMP) method->method_imp;
method->method_imp = (objc_imp_gnu) imp;
return old;
else
{
IMP old = (IMP) method->method_imp;
method->method_imp = (objc_imp_gnu) imp;
if (CLS_ISRESOLV(cls))
{
__objc_update_dispatch_table_for_class(cls);
}
return old;
}
}