summaryrefslogtreecommitdiff
path: root/Python/strtod.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/strtod.c')
-rw-r--r--Python/strtod.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Python/strtod.c b/Python/strtod.c
index 106ec6e136..d41b6908d0 100644
--- a/Python/strtod.c
+++ b/Python/strtod.c
@@ -1,17 +1,15 @@
/* This is not a proper strtod() implementation, but sufficient for Python.
Python won't detect floating point constant overflow, though. */
-#include <string.h>
-
+extern int strlen();
extern double atof();
-/*ARGSUSED*/
double
strtod(p, pp)
char *p;
char **pp;
{
if (pp)
- *pp = strchr(p, '\0');
+ *pp = p + strlen(p);
return atof(p);
}