mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 09:31:07 +00:00
Nasty recursion problem fixed.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9714 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bc34d7aa64
commit
70179f6bd5
3 changed files with 23 additions and 1 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2001-04-26 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSString.m: ([+initialize]) protect with flag so it is safe
|
||||||
|
to call this method more than once.
|
||||||
|
* Source/externs.m: GSBuildStrings() call +initialize method for
|
||||||
|
NSString to ensure that the class is properly initialised even if
|
||||||
|
this function has been called from NSObjects +initialize, which was
|
||||||
|
in turn called in preparation for NSString initialisation!
|
||||||
|
|
||||||
2001-04-25 Adam Fedor <fedor@gnu.org>
|
2001-04-25 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
* configure.in: Much simplified NeXT checks. Just use LIBRARY_COMBO
|
* configure.in: Much simplified NeXT checks. Just use LIBRARY_COMBO
|
||||||
|
|
|
@ -307,8 +307,15 @@ handle_printf_atsign (FILE *stream,
|
||||||
|
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
{
|
{
|
||||||
if (self == [NSString class])
|
/*
|
||||||
|
* Flag required as we call this method explicitly from GSBuildStrings()
|
||||||
|
* to ensure that NSString is initialised properly.
|
||||||
|
*/
|
||||||
|
static BOOL beenHere = NO;
|
||||||
|
|
||||||
|
if (self == [NSString class] && beenHere == NO)
|
||||||
{
|
{
|
||||||
|
beenHere = YES;
|
||||||
plSel = @selector(initWithCharacters:length:);
|
plSel = @selector(initWithCharacters:length:);
|
||||||
cMemberSel = @selector(characterIsMember:);
|
cMemberSel = @selector(characterIsMember:);
|
||||||
_DefaultStringEncoding = GetDefEncoding();
|
_DefaultStringEncoding = GetDefEncoding();
|
||||||
|
|
|
@ -308,6 +308,12 @@ GSBuildStrings()
|
||||||
if (SClass == 0)
|
if (SClass == 0)
|
||||||
{
|
{
|
||||||
SClass = [NSString class];
|
SClass = [NSString class];
|
||||||
|
/*
|
||||||
|
* Ensure that NSString is initialized ... because we are called
|
||||||
|
* from [NSObject +initialize] which might be executing as a
|
||||||
|
* result of a call to [NSString +initialize] !
|
||||||
|
*/
|
||||||
|
[SClass initialize];
|
||||||
InPortAcceptedClientNotification
|
InPortAcceptedClientNotification
|
||||||
= [[SClass alloc] initWithCString:
|
= [[SClass alloc] initWithCString:
|
||||||
"InPortAcceptedClientNotification"];
|
"InPortAcceptedClientNotification"];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue