Moved new NSDateFormatter ivars to a struct in _reserved. Use unum_clone() to copy formatter in NSDateFormatter.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32172 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
stefanbidi 2011-02-15 00:49:48 +00:00
parent f014c32856
commit e141e8aada
4 changed files with 96 additions and 61 deletions

View file

@ -300,11 +300,12 @@ static NSUInteger _defaultBehavior = 0;
o->_reserved = NSZoneCalloc([self zone], 1, sizeof(Internal));
memcpy(inst, this, sizeof(Internal));
IF_NO_GC(RETAIN(inst->_locale);)
if (inst->_formatter != NULL)
{
inst->_formatter = NULL;
[o _resetUNumberFormat];
}
#if GS_USE_ICU == 1
{
UErrorCode err = U_ZERO_ERROR;
inst->_formatter = unum_clone (this->_formatter, &err);
}
#endif
}
return o;
}