]>
Commit | Line | Data |
---|---|---|
c8042e10 DM |
1 | #ifndef Py_STRTOD_H\r |
2 | #define Py_STRTOD_H\r | |
3 | \r | |
4 | #ifdef __cplusplus\r | |
5 | extern "C" {\r | |
6 | #endif\r | |
7 | \r | |
8 | \r | |
9 | PyAPI_FUNC(double) PyOS_ascii_strtod(const char *str, char **ptr);\r | |
10 | PyAPI_FUNC(double) PyOS_ascii_atof(const char *str);\r | |
11 | \r | |
12 | /* Deprecated in 2.7 and 3.1. Will disappear in 2.8 (if it exists) and 3.2 */\r | |
13 | PyAPI_FUNC(char *) PyOS_ascii_formatd(char *buffer, size_t buf_len,\r | |
14 | const char *format, double d);\r | |
15 | PyAPI_FUNC(double) PyOS_string_to_double(const char *str,\r | |
16 | char **endptr,\r | |
17 | PyObject *overflow_exception);\r | |
18 | \r | |
19 | /* The caller is responsible for calling PyMem_Free to free the buffer\r | |
20 | that's is returned. */\r | |
21 | PyAPI_FUNC(char *) PyOS_double_to_string(double val,\r | |
22 | char format_code,\r | |
23 | int precision,\r | |
24 | int flags,\r | |
25 | int *type);\r | |
26 | \r | |
27 | PyAPI_FUNC(double) _Py_parse_inf_or_nan(const char *p, char **endptr);\r | |
28 | \r | |
29 | \r | |
30 | /* PyOS_double_to_string's "flags" parameter can be set to 0 or more of: */\r | |
31 | #define Py_DTSF_SIGN 0x01 /* always add the sign */\r | |
32 | #define Py_DTSF_ADD_DOT_0 0x02 /* if the result is an integer add ".0" */\r | |
33 | #define Py_DTSF_ALT 0x04 /* "alternate" formatting. it's format_code\r | |
34 | specific */\r | |
35 | \r | |
36 | /* PyOS_double_to_string's "type", if non-NULL, will be set to one of: */\r | |
37 | #define Py_DTST_FINITE 0\r | |
38 | #define Py_DTST_INFINITE 1\r | |
39 | #define Py_DTST_NAN 2\r | |
40 | \r | |
41 | #ifdef __cplusplus\r | |
42 | }\r | |
43 | #endif\r | |
44 | \r | |
45 | #endif /* !Py_STRTOD_H */\r |