1use crate::object::PyObject;
2use std::ffi::{c_char, c_double, c_int};
3
4extern_libpython! {
5 pub fn PyOS_string_to_double(
6 str: *const c_char,
7 endptr: *mut *mut c_char,
8 overflow_exception: *mut PyObject,
9 ) -> c_double;
10 pub fn PyOS_double_to_string(
11 val: c_double,
12 format_code: c_char,
13 precision: c_int,
14 flags: c_int,
15 _type: *mut c_int,
16 ) -> *mut c_char;
17}
18
19pub const Py_DTSF_SIGN: c_int = 0x01; pub const Py_DTSF_ADD_DOT_0: c_int = 0x02; pub const Py_DTSF_ALT: c_int = 0x04; pub const Py_DTST_FINITE: c_int = 0;
29pub const Py_DTST_INFINITE: c_int = 1;
30pub const Py_DTST_NAN: c_int = 2;