mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
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:
parent
891d7e0f24
commit
360e1f6ec6
5 changed files with 66 additions and 66 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue