discuss-gnustep
[Top][All Lists]
Advanced

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

Re: This NSConstantString thing


From: Richard Frith-Macdonald
Subject: Re: This NSConstantString thing
Date: Wed, 13 Mar 2002 00:02:18 +0000

On Tuesday, March 12, 2002, at 11:34 PM, Markus Hitter wrote:


Am Dienstag den, 12. März 2002, um 22:50, schrieb Richard Frith-Macdonald:

PS. If the Apple compiler really *does* insist on specific ivar names in some way, we need to
do something like -

It doesn't insist on names but checks the declarations. A plain char* is recognized but not the same inside a union. To check all possible valid declarations, the check could become quite complex.

@interface NXConstantString : NSString
{
#ifdef  PRIVATE_CONST_STRING
  union {
    unichar     *u;
    unsigned char   *c;
  } _contents;
  unsigned int  _count;
#else
  char *cString;
  unsigned int len;
#endif
}

Then define PRIVATE_CONST_STRING before including NSString.h in the file where NXConstantString is actually implemented.

This solution would make the Foundation compile, of course. But it would make the unicode issue even worse as far as I can see for now.

But there *IS* no unicode issue. Please re-read my earlier emails and look at the comments in the header.


However, I suspect it does not insist on that at all ...

It does. The error message is:

GSMime.m: In function `decodeWord':
GSMime.m:200: interface `NSConstantString' lacks required ivars

I don't know what the cause of that message is ... as I said, perhaps this is a new check, or perhaps
it's just a problem with the headers, or even a compiler bug.

Either way, it doesn't effect the fact that the modification you made to the header is wrong. This is obviously not hugely important right now (with GNUstep not ported to darwin yet, and the change only
effects darwin), but it does need to be fixed.




reply via email to

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