mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
prevent re-initialize
This commit is contained in:
parent
f12eabad50
commit
598236d3ef
1 changed files with 8 additions and 2 deletions
|
@ -642,8 +642,11 @@ static NSMapTable *absolutes = 0;
|
|||
|
||||
+ (void) initialize
|
||||
{
|
||||
if (self == [GSAbsTimeZone class])
|
||||
static BOOL beenHere = NO;
|
||||
|
||||
if (NO == beenHere && self == [GSAbsTimeZone class])
|
||||
{
|
||||
beenHere = YES;
|
||||
absolutes = NSCreateMapTable(NSIntegerMapKeyCallBacks,
|
||||
NSNonOwnedPointerMapValueCallBacks, 0);
|
||||
}
|
||||
|
@ -1340,8 +1343,11 @@ static NSMapTable *absolutes = 0;
|
|||
|
||||
+ (void) initialize
|
||||
{
|
||||
if (self == [NSTimeZone class])
|
||||
static BOOL beenHere = NO;
|
||||
|
||||
if (NO == beenHere && self == [NSTimeZone class])
|
||||
{
|
||||
beenHere = YES;
|
||||
NSTimeZoneClass = self;
|
||||
GS_MUTEX_INIT_RECURSIVE(zone_mutex);
|
||||
GSPlaceholderTimeZoneClass = [GSPlaceholderTimeZone class];
|
||||
|
|
Loading…
Reference in a new issue