Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 753e2bf

Browse files
committed
Initial revision
1 parent 2720106 commit 753e2bf

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Python/strtod.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* This is not a proper strtod() implementation, but sufficient for Python.
2+
Python won't detect floating point constant overflow, though. */
3+
4+
#include <string.h>
5+
6+
extern double atof();
7+
8+
/*ARGSUSED*/
9+
double
10+
strtod(p, pp)
11+
char *p;
12+
char **pp;
13+
{
14+
if (pp)
15+
*pp = strchr(p, '\0');
16+
return atof(p);
17+
}

0 commit comments

Comments
 (0)