mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 17:10:48 +00:00
add some consistency checks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39650 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d220beeab2
commit
f306de43e8
1 changed files with 4 additions and 11 deletions
|
@ -89,7 +89,7 @@ static NSString *defaultsFile = @".GNUstepDefaults";
|
|||
|
||||
static NSUserDefaults *sharedDefaults = nil;
|
||||
static NSDictionary *argumentsDictionary = nil;
|
||||
static NSMutableString *processName = nil;
|
||||
static NSString *processName = nil;
|
||||
static NSRecursiveLock *classLock = nil;
|
||||
static NSLock *syncLock = nil;
|
||||
|
||||
|
@ -585,6 +585,8 @@ newLanguages(NSArray *oldNames)
|
|||
argumentsDictionary = [NSDictionary new];
|
||||
[self registerAtExit];
|
||||
|
||||
processName = [[[NSProcessInfo processInfo] processName] copy];
|
||||
|
||||
/* Initialise the defaults flags to take values from the
|
||||
* process arguments. These are otherwise set in updateCache()
|
||||
* We do this early on so that the boolean argument settings can
|
||||
|
@ -1131,16 +1133,6 @@ newLanguages(NSArray *oldNames)
|
|||
|
||||
self = [super init];
|
||||
|
||||
/*
|
||||
* Global variable.
|
||||
*/
|
||||
if (processName == nil)
|
||||
{
|
||||
NSString *s = [[NSProcessInfo processInfo] processName];
|
||||
|
||||
processName = [s copy];
|
||||
}
|
||||
|
||||
if (path == nil || [path isEqual: @""] == YES)
|
||||
{
|
||||
path = [GSDefaultsRootForUser(NSUserName())
|
||||
|
@ -2293,6 +2285,7 @@ NSDictionary *GSPrivateDefaultLocale()
|
|||
|
||||
- (void) _changePersistentDomain: (NSString*)domainName
|
||||
{
|
||||
NSAssert(nil != domainName, NSInvalidArgumentException);
|
||||
[_lock lock];
|
||||
NS_DURING
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue