mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Added a hack to allow the stuff GSString caches to be re-cached. Ideally we wouldn't be caching any of this stuff (or, with libobjc2, we'd be using the slot mechanism to invalidate the cache when required).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31005 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3f1a92959d
commit
495aa33a99
1 changed files with 9 additions and 5 deletions
|
@ -247,11 +247,11 @@ static NSStringEncoding internalEncoding = NSISOLatin1StringEncoding;
|
|||
* initialized, and caches classes and some method implementations.
|
||||
*/
|
||||
static void
|
||||
setup(void)
|
||||
setup(BOOL rerun)
|
||||
{
|
||||
static BOOL beenHere = NO;
|
||||
|
||||
if (beenHere == NO)
|
||||
if (!beenHere || rerun)
|
||||
{
|
||||
beenHere = YES;
|
||||
|
||||
|
@ -325,7 +325,7 @@ static void getCString_u(GSStr self, char *buffer, unsigned int maxLength,
|
|||
@implementation GSPlaceholderString
|
||||
+ (void) initialize
|
||||
{
|
||||
setup();
|
||||
setup(NO);
|
||||
}
|
||||
|
||||
- (id) autorelease
|
||||
|
@ -2817,7 +2817,11 @@ transmute(GSStr self, NSString *aString)
|
|||
|
||||
+ (void) initialize
|
||||
{
|
||||
setup();
|
||||
setup(NO);
|
||||
}
|
||||
+ (void) reinitialize
|
||||
{
|
||||
setup(YES);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3637,7 +3641,7 @@ agree, create a new GSUnicodeInlineString otherwise.
|
|||
|
||||
+ (void) initialize
|
||||
{
|
||||
setup();
|
||||
setup(NO);
|
||||
GSObjCAddClassBehavior(self, [GSString class]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue