summaryrefslogtreecommitdiffstats
path: root/Python/strtod.c
blob: d41b6908d00ce74611cb7eb6d67405fe39fac03f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* This is not a proper strtod() implementation, but sufficient for Python.
   Python won't detect floating point constant overflow, though. */

extern int strlen();
extern double atof();

double
strtod(p, pp)
	char *p;
	char **pp;
{
	if (pp)
		*pp = p + strlen(p);
	return atof(p);
}