Mercurial > cpython-lru_cache-weakref
diff Python/ast.c @ 36155:fe9bd21f27f2 legacy-trunk
SF#1391872
Floating point literals don't work in non-US locale in 2.5. Patch and
new locale tests by Hye-Shik Chang.
| author | Fredrik Lundh <fredrik@pythonware.com> |
|---|---|
| date | Thu, 29 Dec 2005 20:35:52 +0000 |
| parents | 8cb686dd6e64 |
| children | 1685dcd2f929 |
line wrap: on
line diff
--- a/Python/ast.c Thu Dec 29 17:43:08 2005 +0000 +++ b/Python/ast.c Thu Dec 29 20:35:52 2005 +0000 @@ -2773,7 +2773,7 @@ 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 @@ #endif { PyFPE_START_PROTECT("atof", return 0) - dx = atof(s); + dx = PyOS_ascii_atof(s); PyFPE_END_PROTECT(dx) return PyFloat_FromDouble(dx); }
