mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +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
7003158ddd
commit
e3e8fb8dea
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.
|
* initialized, and caches classes and some method implementations.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
setup(void)
|
setup(BOOL rerun)
|
||||||
{
|
{
|
||||||
static BOOL beenHere = NO;
|
static BOOL beenHere = NO;
|
||||||
|
|
||||||
if (beenHere == NO)
|
if (!beenHere || rerun)
|
||||||
{
|
{
|
||||||
beenHere = YES;
|
beenHere = YES;
|
||||||
|
|
||||||
|
@ -325,7 +325,7 @@ static void getCString_u(GSStr self, char *buffer, unsigned int maxLength,
|
||||||
@implementation GSPlaceholderString
|
@implementation GSPlaceholderString
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
{
|
{
|
||||||
setup();
|
setup(NO);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) autorelease
|
- (id) autorelease
|
||||||
|
@ -2817,7 +2817,11 @@ transmute(GSStr self, NSString *aString)
|
||||||
|
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
{
|
{
|
||||||
setup();
|
setup(NO);
|
||||||
|
}
|
||||||
|
+ (void) reinitialize
|
||||||
|
{
|
||||||
|
setup(YES);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -3637,7 +3641,7 @@ agree, create a new GSUnicodeInlineString otherwise.
|
||||||
|
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
{
|
{
|
||||||
setup();
|
setup(NO);
|
||||||
GSObjCAddClassBehavior(self, [GSString class]);
|
GSObjCAddClassBehavior(self, [GSString class]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue