jpayne@69: #ifndef Py_STRTOD_H jpayne@69: #define Py_STRTOD_H jpayne@69: jpayne@69: #ifdef __cplusplus jpayne@69: extern "C" { jpayne@69: #endif jpayne@69: jpayne@69: jpayne@69: PyAPI_FUNC(double) PyOS_string_to_double(const char *str, jpayne@69: char **endptr, jpayne@69: PyObject *overflow_exception); jpayne@69: jpayne@69: /* The caller is responsible for calling PyMem_Free to free the buffer jpayne@69: that's is returned. */ jpayne@69: PyAPI_FUNC(char *) PyOS_double_to_string(double val, jpayne@69: char format_code, jpayne@69: int precision, jpayne@69: int flags, jpayne@69: int *type); jpayne@69: jpayne@69: #ifndef Py_LIMITED_API jpayne@69: PyAPI_FUNC(PyObject *) _Py_string_to_number_with_underscores( jpayne@69: const char *str, Py_ssize_t len, const char *what, PyObject *obj, void *arg, jpayne@69: PyObject *(*innerfunc)(const char *, Py_ssize_t, void *)); jpayne@69: jpayne@69: PyAPI_FUNC(double) _Py_parse_inf_or_nan(const char *p, char **endptr); jpayne@69: #endif jpayne@69: jpayne@69: jpayne@69: /* PyOS_double_to_string's "flags" parameter can be set to 0 or more of: */ jpayne@69: #define Py_DTSF_SIGN 0x01 /* always add the sign */ jpayne@69: #define Py_DTSF_ADD_DOT_0 0x02 /* if the result is an integer add ".0" */ jpayne@69: #define Py_DTSF_ALT 0x04 /* "alternate" formatting. it's format_code jpayne@69: specific */ jpayne@69: jpayne@69: /* PyOS_double_to_string's "type", if non-NULL, will be set to one of: */ jpayne@69: #define Py_DTST_FINITE 0 jpayne@69: #define Py_DTST_INFINITE 1 jpayne@69: #define Py_DTST_NAN 2 jpayne@69: jpayne@69: #ifdef __cplusplus jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: #endif /* !Py_STRTOD_H */