mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
fix #23570
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27645 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c1aae0c84c
commit
86c18013e5
3 changed files with 11 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2009-01-21 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSUserDefaults.m: ([setObject:forKey:]) copy the object
|
||||
rather than just retaining it. Fixes bug #23570
|
||||
|
||||
2009-01-20 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Documentation/manual/ExceptionHandling.texi: Fix error in
|
||||
|
|
|
@ -384,10 +384,11 @@ GS_EXPORT NSString* const GSLocale;
|
|||
- (void) setInteger: (int)value forKey: (NSString*)defaultName;
|
||||
|
||||
/**
|
||||
* Sets an object value for defaultName in the application domain.<br />
|
||||
* Sets a copy of an object value for defaultName in the
|
||||
* application domain.<br />
|
||||
* The defaultName must be a non-empty string.<br />
|
||||
* The value must be an instance of one of the [NSString-propertyList]
|
||||
* classes.<br />
|
||||
* The value to be copied into the domain must be an instance
|
||||
* of one of the [NSString-propertyList] classes.<br />
|
||||
* <p>Causes a NSUserDefaultsDidChangeNotification to be posted
|
||||
* if this is the first change to a persistent-domain since the
|
||||
* last -synchronize.
|
||||
|
|
|
@ -1158,6 +1158,7 @@ static BOOL isPlistObject(id o)
|
|||
value, defaultName];
|
||||
}
|
||||
|
||||
value = [value copy];
|
||||
[_lock lock];
|
||||
obj = [_persDomains objectForKey: processName];
|
||||
if ([obj isKindOfClass: NSMutableDictionaryClass] == YES)
|
||||
|
@ -1173,6 +1174,7 @@ static BOOL isPlistObject(id o)
|
|||
[dict setObject: value forKey: defaultName];
|
||||
[self __changePersistentDomain: processName];
|
||||
[_lock unlock];
|
||||
RELEASE(value);
|
||||
}
|
||||
|
||||
- (void) setValue: (id)value forKey: (NSString*)defaultName
|
||||
|
|
Loading…
Reference in a new issue