mirror of git://gcc.gnu.org/git/gcc.git
Fixed object_is_class and object_is_metaclass
From-SVN: r44039
This commit is contained in:
parent
0ae854922a
commit
42d28de5b2
|
|
@ -1,3 +1,10 @@
|
||||||
|
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>
|
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
|
* configure.in (AC_EXEEXT): Work around in case it expands to
|
||||||
|
|
|
||||||
|
|
@ -580,19 +580,21 @@ object_get_super_class
|
||||||
static inline BOOL
|
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
|
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
|
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*
|
struct sarray*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue