summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2005-12-29 20:35:52 (GMT)
committerFredrik Lundh <fredrik@pythonware.com>2005-12-29 20:35:52 (GMT)
commit24f0fa97c5ed31397f20b094a166de325036e3c2 (patch)
tree982aa4c2c369a9893b9208df4ca36860388e40a9 /Python
parentb9359c402bdaeefbbd5408af3b29200fc85ceb18 (diff)
downloadcpython-24f0fa97c5ed31397f20b094a166de325036e3c2.zip
cpython-24f0fa97c5ed31397f20b094a166de325036e3c2.tar.gz
cpython-24f0fa97c5ed31397f20b094a166de325036e3c2.tar.bz2
SF#1391872
Floating point literals don't work in non-US locale in 2.5. Patch and new locale tests by Hye-Shik Chang.
Diffstat (limited to 'Python')
-rw-r--r--Python/ast.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 93334dc..745cda2 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -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);
}