mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +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
d87f6278c5
commit
0ead926e50
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>
|
2009-01-20 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Documentation/manual/ExceptionHandling.texi: Fix error in
|
* Documentation/manual/ExceptionHandling.texi: Fix error in
|
||||||
|
|
|
@ -384,10 +384,11 @@ GS_EXPORT NSString* const GSLocale;
|
||||||
- (void) setInteger: (int)value forKey: (NSString*)defaultName;
|
- (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 defaultName must be a non-empty string.<br />
|
||||||
* The value must be an instance of one of the [NSString-propertyList]
|
* The value to be copied into the domain must be an instance
|
||||||
* classes.<br />
|
* of one of the [NSString-propertyList] classes.<br />
|
||||||
* <p>Causes a NSUserDefaultsDidChangeNotification to be posted
|
* <p>Causes a NSUserDefaultsDidChangeNotification to be posted
|
||||||
* if this is the first change to a persistent-domain since the
|
* if this is the first change to a persistent-domain since the
|
||||||
* last -synchronize.
|
* last -synchronize.
|
||||||
|
|
|
@ -1158,6 +1158,7 @@ static BOOL isPlistObject(id o)
|
||||||
value, defaultName];
|
value, defaultName];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
value = [value copy];
|
||||||
[_lock lock];
|
[_lock lock];
|
||||||
obj = [_persDomains objectForKey: processName];
|
obj = [_persDomains objectForKey: processName];
|
||||||
if ([obj isKindOfClass: NSMutableDictionaryClass] == YES)
|
if ([obj isKindOfClass: NSMutableDictionaryClass] == YES)
|
||||||
|
@ -1173,6 +1174,7 @@ static BOOL isPlistObject(id o)
|
||||||
[dict setObject: value forKey: defaultName];
|
[dict setObject: value forKey: defaultName];
|
||||||
[self __changePersistentDomain: processName];
|
[self __changePersistentDomain: processName];
|
||||||
[_lock unlock];
|
[_lock unlock];
|
||||||
|
RELEASE(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setValue: (id)value forKey: (NSString*)defaultName
|
- (void) setValue: (id)value forKey: (NSString*)defaultName
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue