Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:06:50

0001 #ifndef Py_STRTOD_H
0002 #define Py_STRTOD_H
0003 
0004 #ifdef __cplusplus
0005 extern "C" {
0006 #endif
0007 
0008 
0009 PyAPI_FUNC(double) PyOS_string_to_double(const char *str,
0010                                          char **endptr,
0011                                          PyObject *overflow_exception);
0012 
0013 /* The caller is responsible for calling PyMem_Free to free the buffer
0014    that's is returned. */
0015 PyAPI_FUNC(char *) PyOS_double_to_string(double val,
0016                                          char format_code,
0017                                          int precision,
0018                                          int flags,
0019                                          int *type);
0020 
0021 #ifndef Py_LIMITED_API
0022 PyAPI_FUNC(PyObject *) _Py_string_to_number_with_underscores(
0023     const char *str, Py_ssize_t len, const char *what, PyObject *obj, void *arg,
0024     PyObject *(*innerfunc)(const char *, Py_ssize_t, void *));
0025 
0026 PyAPI_FUNC(double) _Py_parse_inf_or_nan(const char *p, char **endptr);
0027 #endif
0028 
0029 
0030 /* PyOS_double_to_string's "flags" parameter can be set to 0 or more of: */
0031 #define Py_DTSF_SIGN      0x01 /* always add the sign */
0032 #define Py_DTSF_ADD_DOT_0 0x02 /* if the result is an integer add ".0" */
0033 #define Py_DTSF_ALT       0x04 /* "alternate" formatting. it's format_code
0034                                   specific */
0035 #define Py_DTSF_NO_NEG_0  0x08 /* negative zero result is coerced to 0 */
0036 
0037 /* PyOS_double_to_string's "type", if non-NULL, will be set to one of: */
0038 #define Py_DTST_FINITE 0
0039 #define Py_DTST_INFINITE 1
0040 #define Py_DTST_NAN 2
0041 
0042 #ifdef __cplusplus
0043 }
0044 #endif
0045 
0046 #endif /* !Py_STRTOD_H */