1use crate::{PyFloat_Check, PyObject};
2use std::os::raw::c_double;
3
4#[repr(C)]
5pub struct PyFloatObject {
6 pub ob_base: PyObject,
7 pub ob_fval: c_double,
8}
9
10#[inline]
11pub unsafe fn _PyFloat_CAST(op: *mut PyObject) -> *mut PyFloatObject {
12 debug_assert_eq!(PyFloat_Check(op), 1);
13 op.cast()
14}
15
16#[inline]
17pub unsafe fn PyFloat_AS_DOUBLE(op: *mut PyObject) -> c_double {
18 (*_PyFloat_CAST(op)).ob_fval
19}
20
21// skipped PyFloat_Pack2
22// skipped PyFloat_Pack4
23// skipped PyFloat_Pack8
24
25// skipped PyFloat_Unpack2
26// skipped PyFloat_Unpack4
27// skipped PyFloat_Unpack8
28