cpython/Python/strtod.c

16 lines
285 B
C
Raw Normal View History

1991-04-16 05:45:40 -03:00
/* This is not a proper strtod() implementation, but sufficient for Python.
Python won't detect floating point constant overflow, though. */
1991-12-24 09:29:10 -04:00
extern int strlen();
1991-04-16 05:45:40 -03:00
extern double atof();
double
strtod(p, pp)
char *p;
char **pp;
{
if (pp)
1991-12-24 09:29:10 -04:00
*pp = p + strlen(p);
1991-04-16 05:45:40 -03:00
return atof(p);
}