[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: This NSConstantString thing
From: |
Markus Hitter |
Subject: |
Re: This NSConstantString thing |
Date: |
Wed, 13 Mar 2002 00:34:13 +0100 |
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.
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
(as GSMime.m is the first file using a @"..." thing)
To my knowledge, this change in behaviour is a requirement to
make ObjC++ work. Details are in the depths of gcc sources ...
and there is rather some problem with include files or some
other problem is confusing you.
For a simpler example, you can have a look at the code configure
uses to check for -fconstant-string-class.
For the unicode stuff, I'll have a look tomorrow ;-)
Markus
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/