Minor fixes to NSCalendar and NSLocale. Also implemented NSCalendar's +currentCalendar.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31819 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Stefan Bidigaray 2011-01-01 22:20:16 +00:00
parent 798336be99
commit 797780c433
4 changed files with 27 additions and 11 deletions

View file

@ -819,7 +819,7 @@ static NSRecursiveLock *classLock = nil;
localeId = [NSString stringWithUTF8String: cLocaleId];
#else
localeId = string;
localeId = [NSLocale canonicalLocaleIdentifierFromString: string];
#endif
[classLock lock];
@ -933,7 +933,10 @@ static NSRecursiveLock *classLock = nil;
- (id) copyWithZone: (NSZone *) zone
{
return RETAIN(self);
if (NSShouldRetainWithZone(self, zone))
return RETAIN(self);
else
return NSCopyObject(self, 0, zone);
}
@end