+Mon Jul 16 12:15:00 2001 Nicola Pero <n.pero@mi.flashnet.it>
+
+ * objc/objc-api.h (object_is_class): Fixed - buggy code was trying
+ to cast an id to a Class, which can not be done. Make the check
+ by using CLS_ISMETA on the class pointer instead.
+ (object_is_meta_class): Similar fix.
+
2001-06-09 Alexandre Oliva <aoliva@redhat.com>, Stephen L Moshier <moshier@mediaone.net>
* configure.in (AC_EXEEXT): Work around in case it expands to
}
static inline BOOL
-object_is_class(id object)
+object_is_class (id object)
{
- return CLS_ISCLASS((Class)object);
+ return ((object != nil) && CLS_ISMETA (object->class_pointer));
}
-
+
static inline BOOL
-object_is_instance(id object)
+object_is_instance (id object)
{
- return (object!=nil)&&CLS_ISCLASS(object->class_pointer);
+ return ((object != nil) && CLS_ISCLASS (object->class_pointer));
}
static inline BOOL
-object_is_meta_class(id object)
+object_is_meta_class (id object)
{
- return CLS_ISMETA((Class)object);
+ return ((object != nil)
+ && !object_is_instance (object)
+ && !object_is_class (object));
}
struct sarray*