Commit 5afc7475 authored by Guido van Rossum's avatar Guido van Rossum

Clear errno, just to be sure.

parent a534ed3e
/* This is not a proper strtod() implementation, but sufficient for Python.
Python won't detect floating point constant overflow, though. */
extern int errno;
extern int strlen();
extern double atof();
......@@ -9,7 +11,12 @@ strtod(p, pp)
char *p;
char **pp;
{
double res;
if (pp)
*pp = p + strlen(p);
return atof(p);
res = atof(p);
errno = 0;
return res;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment