mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
* Headers/Additions/GNUstepBase/GSObjCRuntime.h (GSObjCSuper):
Added test for uninitialized superclass reference. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17650 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
eeddf2fc07
commit
4c190e487d
2 changed files with 19 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-09-10 David Ayers <d.ayers@inode.at>
|
||||
|
||||
* Headers/Additions/GNUstepBase/GSObjCRuntime.h (GSObjCSuper):
|
||||
Added test for uninitialized superclass reference.
|
||||
|
||||
2003-09-10 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSObject.m: Tidy use of GSObjCRuntime a little.
|
||||
|
|
|
@ -139,9 +139,21 @@ GSObjCClass(id obj)
|
|||
* Returns the superclass of this.
|
||||
*/
|
||||
GS_STATIC_INLINE Class
|
||||
GSObjCSuper(Class this)
|
||||
GSObjCSuper(Class class)
|
||||
{
|
||||
return class_get_super_class(this);
|
||||
#ifndef NeXT_RUNTIME
|
||||
if (class != 0 && CLS_ISRESOLV (class) == NO)
|
||||
{
|
||||
const char *name;
|
||||
name = (const char *)class->super_class;
|
||||
if (name == NULL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return objc_lookup_class (name);
|
||||
}
|
||||
#endif
|
||||
return class_get_super_class(class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue