mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
SF#1391872
Floating point literals don't work in non-US locale in 2.5. Patch and new locale tests by Hye-Shik Chang.
This commit is contained in:
parent
b9359c402b
commit
24f0fa97c5
2 changed files with 14 additions and 2 deletions
|
@ -2773,7 +2773,7 @@ parsenumber(const char *s)
|
|||
if (imflag) {
|
||||
c.real = 0.;
|
||||
PyFPE_START_PROTECT("atof", return 0)
|
||||
c.imag = atof(s);
|
||||
c.imag = PyOS_ascii_atof(s);
|
||||
PyFPE_END_PROTECT(c)
|
||||
return PyComplex_FromCComplex(c);
|
||||
}
|
||||
|
@ -2781,7 +2781,7 @@ parsenumber(const char *s)
|
|||
#endif
|
||||
{
|
||||
PyFPE_START_PROTECT("atof", return 0)
|
||||
dx = atof(s);
|
||||
dx = PyOS_ascii_atof(s);
|
||||
PyFPE_END_PROTECT(dx)
|
||||
return PyFloat_FromDouble(dx);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue