[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Using -fconstant-string-class=
From: |
Nicola Pero |
Subject: |
Using -fconstant-string-class= |
Date: |
Wed, 6 Jun 2001 16:40:03 +0200 (CEST) |
GCC 3.0 now provides -fconstant-string-class to change the name of the
class used for constant strings. I hope that will work, but I'm not sure
as I have not yet tested it.
Anyway, my plan would be:
1. test -fconstant-string-class in isolation to make sure it works;
2. assuming it works, add support in gnustep-base for it.
2. would sketchy work something like as follows:
In core/base/configure.in we need to detect that the compiler supports
-fconstant-string-class.
If that is the case:
* we add -fconstant-string-class to the flags in base.make, so they are
then used to compile everything containing the base library, and we
redirect all constant strings to NSConstantString.
* we do not compile NXConstantString in gnustep-base, but rather we
compile in the same code but with class name NSConstantString.
* we then need to update the code referring to NXConstantString to refer
to NSConstantString. And that gives me an idea.
* In case client code needs to refer to the constant-string class, we
need to have a way to communicate to the client code which one is the
constant string class (because depending on the case, that would then
be NXConstantString or NSConstantString). I suppose we could add a
`+constantStringClass' to NSString (or similar, better name chosen by
an Englishman), which returns the class. Then, even inside the
gnustep-base library, we update all [NXConstantString class] calls to
be [NSString constantStringClass].
Any comments ?
- Using -fconstant-string-class=,
Nicola Pero <=