1#ifndef Py_CPYTHON_FLOATOBJECT_H
2#  error "this header file must not be included directly"
3#endif
4
5typedef struct {
6    PyObject_HEAD
7    double ob_fval;
8} PyFloatObject;
9
10// Macro version of PyFloat_AsDouble() trading safety for speed.
11// It doesn't check if op is a double object.
12#define PyFloat_AS_DOUBLE(op) (((PyFloatObject *)(op))->ob_fval)
13
14
15PyAPI_FUNC(int) PyFloat_Pack2(double x, char *p, int le);
16PyAPI_FUNC(int) PyFloat_Pack4(double x, char *p, int le);
17PyAPI_FUNC(int) PyFloat_Pack8(double x, char *p, int le);
18
19PyAPI_FUNC(double) PyFloat_Unpack2(const char *p, int le);
20PyAPI_FUNC(double) PyFloat_Unpack4(const char *p, int le);
21PyAPI_FUNC(double) PyFloat_Unpack8(const char *p, int le);
22