Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-11-19 09:50:54

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 /* PyOS_double_to_string's "flags" parameter can be set to 0 or more of: */
0022 #define Py_DTSF_SIGN      0x01 /* always add the sign */
0023 #define Py_DTSF_ADD_DOT_0 0x02 /* if the result is an integer add ".0" */
0024 #define Py_DTSF_ALT       0x04 /* "alternate" formatting. it's format_code
0025                                   specific */
0026 #define Py_DTSF_NO_NEG_0  0x08 /* negative zero result is coerced to 0 */
0027 
0028 /* PyOS_double_to_string's "type", if non-NULL, will be set to one of: */
0029 #define Py_DTST_FINITE 0
0030 #define Py_DTST_INFINITE 1
0031 #define Py_DTST_NAN 2
0032 
0033 #ifdef __cplusplus
0034 }
0035 #endif
0036 
0037 #endif /* !Py_STRTOD_H */