mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Initial revision
This commit is contained in:
17
Python/strtod.c
Normal file
17
Python/strtod.c
Normal file
@@ -0,0 +1,17 @@
|
||||
/* This is not a proper strtod() implementation, but sufficient for Python.
|
||||
Python won't detect floating point constant overflow, though. */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
extern double atof();
|
||||
|
||||
/*ARGSUSED*/
|
||||
double
|
||||
strtod(p, pp)
|
||||
char *p;
|
||||
char **pp;
|
||||
{
|
||||
if (pp)
|
||||
*pp = strchr(p, '\0');
|
||||
return atof(p);
|
||||
}
|
||||
Reference in New Issue
Block a user