mirror of
https://github.com/python/cpython.git
synced 2025-10-21 06:02:21 +00:00
Patch #774665: Make Python LC_NUMERIC agnostic.
This commit is contained in:
parent
6ccc9a99df
commit
737ea82a5a
14 changed files with 317 additions and 103 deletions
|
@ -1379,7 +1379,7 @@ parsenumber(struct compiling *c, char *s)
|
|||
Py_complex z;
|
||||
z.real = 0.;
|
||||
PyFPE_START_PROTECT("atof", return 0)
|
||||
z.imag = atof(s);
|
||||
z.imag = PyOS_ascii_atof(s);
|
||||
PyFPE_END_PROTECT(z)
|
||||
return PyComplex_FromCComplex(z);
|
||||
}
|
||||
|
@ -1387,7 +1387,7 @@ parsenumber(struct compiling *c, 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