]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Don't rely on <string.h>
authorGuido van Rossum <guido@python.org>
Tue, 24 Dec 1991 13:29:10 +0000 (13:29 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 24 Dec 1991 13:29:10 +0000 (13:29 +0000)
Python/strtod.c

index 106ec6e136328ca7c45bf140eb489dc0b34a2171..d41b6908d00ce74611cb7eb6d67405fe39fac03f 100644 (file)
@@ -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);
 }