* Source/NSDateFormatter.m

(-initWithDateFormat:allowNaturalLanguage:):
        Use method -setDateFormat: to get correct behaviour.
        * Source/NSDateFormatter.m (-setDateFormat:): User ASSIGNCOPY
        * for _dateFormat.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37695 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2014-02-18 21:14:11 +00:00
parent e51bd0979d
commit d268cde2e2
2 changed files with 49 additions and 45 deletions

View file

@ -1,3 +1,10 @@
2014-02-18 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSDateFormatter.m
(-initWithDateFormat:allowNaturalLanguage:):
Use method -setDateFormat: to get correct behaviour.
* Source/NSDateFormatter.m (-setDateFormat:): User ASSIGNCOPY for _dateFormat.
2014-02-14 Quentin Mathe <quentin.mathe@gmail.com> 2014-02-14 Quentin Mathe <quentin.mathe@gmail.com>
* Headers/Foundation/NSNotification.h * Headers/Foundation/NSNotification.h
@ -18619,4 +18626,3 @@ Copyright @copyright{} 2005 Free Software Foundation
Copying and distribution of this file, with or without modification, Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. notice and this notice are preserved.

View file

@ -257,7 +257,7 @@ static NSDateFormatterBehavior _defaultBehavior = 0;
if (self == nil) if (self == nil)
return nil; return nil;
_dateFormat = [format copy]; [self setDateFormat: format];
_allowsNaturalLanguage = flag; _allowsNaturalLanguage = flag;
internal->_behavior = NSDateFormatterBehavior10_0; internal->_behavior = NSDateFormatterBehavior10_0;
return self; return self;
@ -422,9 +422,7 @@ static NSDateFormatterBehavior _defaultBehavior = 0;
NSZoneFree ([self zone], pattern); NSZoneFree ([self zone], pattern);
#endif #endif
if (_dateFormat) ASSIGNCOPY(_dateFormat, string);
RELEASE(_dateFormat);
_dateFormat = RETAIN(string);
} }
- (NSDateFormatterStyle) dateStyle - (NSDateFormatterStyle) dateStyle