Author: mlytwyn Date: Sat Dec 17 21:36:04 2016 New Revision: 40271 URL: http://svn.gna.org/viewcvs/gnustep?rev=40271&view=rev Log: Fix last check in per GNUstep standards - setProcessName should be private
Modified: libs/base/branches/gnustep_testplant_branch/Headers/Foundation/NSUserDefaults.h libs/base/branches/gnustep_testplant_branch/Source/NSBundle.m libs/base/branches/gnustep_testplant_branch/Source/NSUserDefaults.m Modified: libs/base/branches/gnustep_testplant_branch/Headers/Foundation/NSUserDefaults.h URL: http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Headers/Foundation/NSUserDefaults.h?rev=40271&r1=40270&r2=40271&view=diff ============================================================================== --- libs/base/branches/gnustep_testplant_branch/Headers/Foundation/NSUserDefaults.h (original) +++ libs/base/branches/gnustep_testplant_branch/Headers/Foundation/NSUserDefaults.h Sat Dec 17 21:36:04 2016 @@ -274,8 +274,6 @@ + (void) setUserLanguages: (NSArray*)languages; #endif -+ (void) setProcessName: (NSString*) processName; - #if OS_API_VERSION(GSAPI_MACOSX, GS_API_LATEST) /** * Adds the domain names aName to the search list of the receiver.<br /> Modified: libs/base/branches/gnustep_testplant_branch/Source/NSBundle.m URL: http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/NSBundle.m?rev=40271&r1=40270&r2=40271&view=diff ============================================================================== --- libs/base/branches/gnustep_testplant_branch/Source/NSBundle.m (original) +++ libs/base/branches/gnustep_testplant_branch/Source/NSBundle.m Sat Dec 17 21:36:04 2016 @@ -172,6 +172,10 @@ static NSLock *pathCacheLock = nil; static NSMutableDictionary *pathCache = nil; + +@interface NSUserDefaults(Private) ++ (void) _setProcessName: (NSString*) processName; +@end @interface NSObject (PrivateFrameworks) + (NSString*) frameworkVersion; @@ -1480,7 +1484,7 @@ _mainBundle = [_mainBundle initWithPath: path]; NSAssert(_mainBundle != nil, NSInternalInconsistencyException); //Testplant:PGL we want to use the bundleIdentifier as the Application domain - [NSUserDefaults setProcessName:[_mainBundle bundleIdentifier]]; + [NSUserDefaults _setProcessName:[_mainBundle bundleIdentifier]]; } [load_lock unlock]; Modified: libs/base/branches/gnustep_testplant_branch/Source/NSUserDefaults.m URL: http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/NSUserDefaults.m?rev=40271&r1=40270&r2=40271&view=diff ============================================================================== --- libs/base/branches/gnustep_testplant_branch/Source/NSUserDefaults.m (original) +++ libs/base/branches/gnustep_testplant_branch/Source/NSUserDefaults.m Sat Dec 17 21:36:04 2016 @@ -436,6 +436,7 @@ - (BOOL) _readDefaults; - (BOOL) _readOnly; - (void) _unlockDefaultsFile; ++ (void) _setProcessName: (NSString*) processName; @end /** @@ -1089,11 +1090,6 @@ [dict release]; } -// Testplant:PGL This is to set the bundleIdentifier after NSBundle loads. -+ (void) setProcessName:(NSString*)pName { - processName = [pName copy]; -} - - (id) init { return [self initWithUser: NSUserName()]; @@ -1115,7 +1111,7 @@ if (processName == nil) { NSString *s = [[NSProcessInfo processInfo] processName]; - [NSUserDefaults setProcessName:s]; + [NSUserDefaults _setProcessName:s]; } if (path == nil || [path isEqual: @""] == YES) @@ -2436,6 +2432,14 @@ isLocked = NO; } + +// Testplant:PGL This is to set the bundleIdentifier after NSBundle loads. +// Testplant:MAL Fix per GNUstep standards - _setProcessName should be private ++ (void) _setProcessName:(NSString*)pName +{ + processName = [pName copy]; +} + @end @implementation GSPersistentDomain _______________________________________________ Gnustep-cvs mailing list Gnustep-cvs@gna.org https://mail.gna.org/listinfo/gnustep-cvs