summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-12-24 13:29:10 (GMT)
committerGuido van Rossum <guido@python.org>1991-12-24 13:29:10 (GMT)
commit54a41d6366dc5a4c12172c54be455b2c701dd24d (patch)
treec965b0d35a795bb41649137dd019cb0d5b8f9664
parent0e8e872ebf96b98b1a1539b2df9a83524562122c (diff)
downloadcpython-54a41d6366dc5a4c12172c54be455b2c701dd24d.zip
cpython-54a41d6366dc5a4c12172c54be455b2c701dd24d.tar.gz
cpython-54a41d6366dc5a4c12172c54be455b2c701dd24d.tar.bz2
Don't rely on <string.h>
-rw-r--r--Python/strtod.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Python/strtod.c b/Python/strtod.c
index 106ec6e..d41b690 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);
}