summaryrefslogtreecommitdiffstats
path: root/Python/dtoa.c
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-05-03 20:33:40 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-05-03 20:33:40 (GMT)
commit725bfd8489e444aedd8dfd686a27ffc308657155 (patch)
tree99d4e0cc2953794a67a5cff491e1897723a119ff /Python/dtoa.c
parent75930f85df76472686a8c4eb587a2a70562f61fe (diff)
downloadcpython-725bfd8489e444aedd8dfd686a27ffc308657155.zip
cpython-725bfd8489e444aedd8dfd686a27ffc308657155.tar.gz
cpython-725bfd8489e444aedd8dfd686a27ffc308657155.tar.bz2
Issue #5914: Add new C-API function PyOS_string_to_double, to complement
PyOS_double_to_string, and deprecate PyOS_ascii_strtod and PyOS_ascii_atof.
Diffstat (limited to 'Python/dtoa.c')
-rw-r--r--Python/dtoa.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/dtoa.c b/Python/dtoa.c
index 1d96304..82434bc 100644
--- a/Python/dtoa.c
+++ b/Python/dtoa.c
@@ -61,6 +61,9 @@
* that hasn't been MALLOC'ed, private_mem should only be used when k <=
* Kmax.
*
+ * 7. _Py_dg_strtod has been modified so that it doesn't accept strings with
+ * leading whitespace.
+ *
***************************************************************/
/* Please send bug reports for the original dtoa.c code to David M. Gay (dmg
@@ -1355,6 +1358,7 @@ _Py_dg_strtod(const char *s00, char **se)
/* no break */
case 0:
goto ret0;
+ /* modify original dtoa.c so that it doesn't accept leading whitespace
case '\t':
case '\n':
case '\v':
@@ -1362,6 +1366,7 @@ _Py_dg_strtod(const char *s00, char **se)
case '\r':
case ' ':
continue;
+ */
default:
goto break2;
}