* Headers/Additions/GNUstepBase/GSObjCRuntime.h (GSObjCSuper):
Added test for uninitialized superclass reference.Commited to HEAD. (And will commit to the branch if no one objects.)
I'm not certain though, whether we want to commit the previos patch: 2003-08-24 David Ayers <d dot ayers at inode dot at>
* Headers/Additions/GNUstepBase/GSObjCRuntime.h
(GSObjCClass): Allow nil values.
(GSObjCIsInstance): Ditto.
(GSObjCIsClass): New function.
(GSClassNameFromObject): Ditto.
(GSObjCIsKindOf): Use GSObjCSuper() in favor of
class_get_super_class()....
(plus some other GSObjCRuntime usage followups that are already part of HEAD)
to the branch, as we might have some subtle implicit semantic changes, but I think the should be minimal and only have effect for people dealing with MetaClasses and such.
If we want them on the branch, I can commit them.
Cheers, David
Index: Headers/Additions/GNUstepBase/GSObjCRuntime.h
===================================================================
RCS file:
/cvsroot/gnustep/gnustep/core/base/Headers/Additions/GNUstepBase/GSObjCRuntime.h,v
retrieving revision 1.2
diff -u -r1.2 GSObjCRuntime.h
--- Headers/Additions/GNUstepBase/GSObjCRuntime.h 24 Aug 2003 23:07:40 -0000
1.2
+++ Headers/Additions/GNUstepBase/GSObjCRuntime.h 10 Sep 2003 09:05:37 -0000
@@ -139,9 +139,21 @@
* 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);
}
/**_______________________________________________ Bug-gnustep mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-gnustep
