mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Fix deadlock and revert previous change
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26603 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
cceb2a06c3
commit
d8a3ed9cba
7 changed files with 43 additions and 25 deletions
|
@ -35,7 +35,6 @@
|
|||
#include "Foundation/NSDecimalNumber.h"
|
||||
#include "Foundation/NSException.h"
|
||||
#include "Foundation/NSPortCoder.h"
|
||||
#include "Foundation/NSUserDefaults.h"
|
||||
|
||||
#include "GSPrivate.h"
|
||||
|
||||
|
@ -357,9 +356,8 @@ static NSDecimalNumber *one;
|
|||
float v = *(float *)value;
|
||||
if (GSIsNAN(v)) return notANumber;
|
||||
if (GSIsInf(v)) return (v < 0.0) ? minNumber : maxNumber;
|
||||
s = [[NSString alloc] initWithFormat: @"%g" locale:
|
||||
[[NSUserDefaults standardUserDefaults] dictionaryRepresentation],
|
||||
(double)v];
|
||||
s = [[NSString alloc] initWithFormat: @"%g"
|
||||
locale: GSPrivateDefaultLocale(), (double)v];
|
||||
self = [self initWithString: s];
|
||||
RELEASE(s);
|
||||
return self;
|
||||
|
@ -372,9 +370,8 @@ static NSDecimalNumber *one;
|
|||
double v = *(double *)value;
|
||||
if (GSIsNAN(v)) return notANumber;
|
||||
if (GSIsInf(v)) return (v < 0.0) ? minNumber : maxNumber;
|
||||
s = [[NSString alloc] initWithFormat: @"%g" locale:
|
||||
[[NSUserDefaults standardUserDefaults] dictionaryRepresentation],
|
||||
v];
|
||||
s = [[NSString alloc] initWithFormat: @"%g"
|
||||
locale: GSPrivateDefaultLocale(), v];
|
||||
self = [self initWithString: s];
|
||||
RELEASE(s);
|
||||
return self;
|
||||
|
@ -416,7 +413,7 @@ static NSDecimalNumber *one;
|
|||
- (id) initWithString: (NSString*)numberValue
|
||||
{
|
||||
return [self initWithString: numberValue
|
||||
locale: [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]];
|
||||
locale: GSPrivateDefaultLocale()];
|
||||
}
|
||||
|
||||
- (id) initWithString: (NSString*)numberValue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue