[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FAIL: -isClass returns NO on an instance

From: Nicola Pero
Subject: Re: FAIL: -isClass returns NO on an instance
Date: Mon, 2 Dec 2002 11:57:51 +0000 (GMT)

> When I run the tests in the tests directory on recent base
> I get 12 unexpected fails.
> Both the base and the tests are from CVS Dec. 1.
> Note that this is my first look again on GNUstep in 8 months,
> so I can not tell if it is a recent problem or not.  
> But I do not  think the problem is base at all, and actually 
> I do not understand why it fails at all.  I expect that on 
> everyones machine but mine the test passes.  But I appreciate
> any help on tracking this done.  
> So let me explain:
> When I run 
> ./gtest-base --tool NSObject
> I get the following output:
> ---------------------------------
> FAIL: -isClass returns NO on an instance
> FAIL: -isClass returns NO on an instance (special evil test for broken 
> libobjc)

Hi Willem - nice to meet you again :-)

what version of libobjc are you using ?

The testcase is mine - and I fixed this bug on Mon Jul 16 12:15:00 2001 on
GCC CVS - the fix is included in all libobjc starting from the one shipped
with GCC 3.0.1.

This bug still exists in the libobjc shipped with gcc-2.91, gcc-2.95, and
gnustep-objc (gnustep-objc is no longer actively maintained, really, our
efforts are better spent maintaining the libobjc shipped with GCC, which
is what people will automatically get installed into their systems).

So ... solution would be: upgrade your compiler/libobjc.

If you just want to get the feeling that it's really fixed and how, and if
you've compiled libobjc from sources, you can fix manually object_is_class
in your libobjc/objc/objc-api.h to be as follows:

static inline BOOL
object_is_class (id object)
  return ((object != nil)  &&  CLS_ISMETA (object->class_pointer));
You need to recompile gnustep-base's NSObject.m so that the new inline
function is compiled in.

Thanks anyway for the detailed reporting, might have been very useful, I
know it was a very puzzling bug, causing -isClass to behave in a very
weird way :-)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]