[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: |
Tue, 12 Mar 2002 21:50:26 +0000 |
On Tuesday, March 12, 2002, at 08:59 PM, Markus Hitter wrote:
With Apple's gcc, the compiler explicitely requires a declaration like:
@interface NXConstantString : NSString /* or NSObject */ {
char *cString;
unsigned int len;
...
}
But GNUstep declares:
@interface NXConstantString : NSString {
union {
unichar *u;
unsigned char *c;
} _contents;
unsigned int _count;
}
PS. If the Apple compiler really *does* insist on specific ivar names in
some way, we need to
do something like -
@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.
However, I suspect it does not insist on that at all ... and there is
rather some problem with
include files or some other problem is confusing you.