[Python-checkins] r71265 - python/branches/py3k-short-float-repr/Objects/floatobject.c
mark.dickinson
python-checkins at python.org
Sun Apr 5 22:07:08 CEST 2009
Author: mark.dickinson
Date: Sun Apr 5 22:07:08 2009
New Revision: 71265
Log:
Remove useless duplicate call to PyOS_ascii_strtod.
Modified:
python/branches/py3k-short-float-repr/Objects/floatobject.c
Modified: python/branches/py3k-short-float-repr/Objects/floatobject.c
==============================================================================
--- python/branches/py3k-short-float-repr/Objects/floatobject.c (original)
+++ python/branches/py3k-short-float-repr/Objects/floatobject.c Sun Apr 5 22:07:08 2009
@@ -197,8 +197,7 @@
sp = s;
/* We don't care about overflow or underflow. If the platform supports
* them, infinities and signed zeroes (on underflow) are fine.
- * However, strtod can return 0 for denormalized numbers, where atof
- * does not. So (alas!) we special-case a zero result. Note that
+ * However, strtod can return 0 for denormalized numbers. Note that
* whether strtod sets errno on underflow is not defined, so we can't
* key off errno.
*/
@@ -259,14 +258,6 @@
"null byte in argument for float()");
goto error;
}
- if (x == 0.0) {
- /* See above -- may have been strtod being anal
- about denorms. */
- PyFPE_START_PROTECT("strtod", goto error)
- x = PyOS_ascii_strtod(s, NULL);
- PyFPE_END_PROTECT(x)
- errno = 0; /* whether atof ever set errno is undefined */
- }
result = PyFloat_FromDouble(x);
error:
if (s_buffer)
More information about the Python-checkins
mailing list