[Python-checkins] r71965 - in python/branches/py3k: Objects/complexobject.c
mark.dickinson
python-checkins at python.org
Sun Apr 26 16:11:18 CEST 2009
Author: mark.dickinson
Date: Sun Apr 26 16:11:18 2009
New Revision: 71965
Log:
Merged revisions 71963 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r71963 | mark.dickinson | 2009-04-26 15:00:08 +0100 (Sun, 26 Apr 2009) | 2 lines
Reset errno before both calls to PyOS_ascii_strtod, not just one.
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Objects/complexobject.c
Modified: python/branches/py3k/Objects/complexobject.c
==============================================================================
--- python/branches/py3k/Objects/complexobject.c (original)
+++ python/branches/py3k/Objects/complexobject.c Sun Apr 26 16:11:18 2009
@@ -746,8 +746,6 @@
return NULL;
}
- errno = 0;
-
/* position on first nonblank */
start = s;
while (*s && isspace(Py_CHARMASK(*s)))
@@ -782,6 +780,7 @@
*/
/* first look for forms starting with <float> */
+ errno = 0;
z = PyOS_ascii_strtod(s, &end);
if (end == s && errno == ENOMEM)
return PyErr_NoMemory();
@@ -794,6 +793,7 @@
if (*s == '+' || *s == '-') {
/* <float><signed-float>j | <float><sign>j */
x = z;
+ errno = 0;
y = PyOS_ascii_strtod(s, &end);
if (end == s && errno == ENOMEM)
return PyErr_NoMemory();
More information about the Python-checkins
mailing list