diff options
author | Guido van Rossum <guido@python.org> | 1991-12-24 13:29:10 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1991-12-24 13:29:10 (GMT) |
commit | 54a41d6366dc5a4c12172c54be455b2c701dd24d (patch) | |
tree | c965b0d35a795bb41649137dd019cb0d5b8f9664 /Python/strtod.c | |
parent | 0e8e872ebf96b98b1a1539b2df9a83524562122c (diff) | |
download | cpython-54a41d6366dc5a4c12172c54be455b2c701dd24d.zip cpython-54a41d6366dc5a4c12172c54be455b2c701dd24d.tar.gz cpython-54a41d6366dc5a4c12172c54be455b2c701dd24d.tar.bz2 |
Don't rely on <string.h>
Diffstat (limited to 'Python/strtod.c')
-rw-r--r-- | Python/strtod.c | 6 |
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); } |