mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-11 08:40:44 +00:00
fixup memory allocation problem
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32197 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2763f73a6c
commit
ffad49b40b
3 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2011-02-16 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSDateFormatter.m:
|
||||||
|
* Source/NSNumberFormatter.m:
|
||||||
|
Fix -initWithCoder: methods to create internal ivar storage.
|
||||||
|
|
||||||
2011-02-16 Richard Frith-Macdonald <rfm@gnu.org>
|
2011-02-16 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSFileManager.m:
|
* Source/NSFileManager.m:
|
||||||
|
|
|
@ -242,9 +242,7 @@ static NSDateFormatterBehavior _defaultBehavior = 0;
|
||||||
|
|
||||||
- (id) initWithCoder: (NSCoder*)aCoder
|
- (id) initWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
self = [super initWithCoder: aCoder];
|
GS_CREATE_INTERNAL(NSDateFormatter)
|
||||||
if (self == nil)
|
|
||||||
return nil;
|
|
||||||
|
|
||||||
[aCoder decodeValuesOfObjCTypes: "@C", &_dateFormat, &_allowsNaturalLanguage];
|
[aCoder decodeValuesOfObjCTypes: "@C", &_dateFormat, &_allowsNaturalLanguage];
|
||||||
return self;
|
return self;
|
||||||
|
|
|
@ -471,6 +471,8 @@ static NSUInteger _defaultBehavior = 0;
|
||||||
|
|
||||||
- (id) initWithCoder: (NSCoder*)decoder
|
- (id) initWithCoder: (NSCoder*)decoder
|
||||||
{
|
{
|
||||||
|
GS_CREATE_INTERNAL(NSNumberFormatter)
|
||||||
|
|
||||||
if ([decoder allowsKeyedCoding])
|
if ([decoder allowsKeyedCoding])
|
||||||
{
|
{
|
||||||
if ([decoder containsValueForKey: @"NS.allowsfloats"])
|
if ([decoder containsValueForKey: @"NS.allowsfloats"])
|
||||||
|
|
Loading…
Reference in a new issue