1 /**
2   Mirror _pystrtod.h
3   */
4 module deimos.python.pystrtod;
5 
6 import deimos.python.object;
7 
8 extern(C):
9 // Python-header-file: Include/pystrtod.h:
10 
11 version(Python_3_2_Or_Later) {
12 }else{
13     /// Availability: <= 3.2
14     double PyOS_ascii_strtod(const(char)* str, char** ptr);
15     /// Availability: <= 3.2
16     double PyOS_ascii_atof(const(char)* str);
17     /// Availability: <= 3.2
18     char* PyOS_ascii_formatd(
19             char* buffer, 
20             size_t buf_len, 
21             const(char)* format, 
22             double d);
23 }
24 
25 version(Python_2_7_Or_Later) {
26     /// Availability: >= 2.7
27     double PyOS_string_to_double(
28             const(char)* str,
29             char** endptr,
30             PyObject* overflow_exception);
31 
32     /** The caller is responsible for calling PyMem_Free to free the buffer
33        that's is returned. */
34     /// Availability: >= 2.7
35     char* PyOS_double_to_string(
36             double val,
37             char format_code,
38             int precision,
39             int flags,
40             int* type);
41 
42     /// Availability: >= 2.7
43     double _Py_parse_inf_or_nan(const(char)* p, char** endptr);
44 }
45