diff options
Diffstat (limited to 'Include/cpython/floatobject.h')
| -rw-r--r-- | Include/cpython/floatobject.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Include/cpython/floatobject.h b/Include/cpython/floatobject.h new file mode 100644 index 0000000000..fffd468690 --- /dev/null +++ b/Include/cpython/floatobject.h @@ -0,0 +1,12 @@ +#ifndef Py_CPYTHON_FLOATOBJECT_H +# error "this header file must not be included directly" +#endif + +typedef struct { + PyObject_HEAD + double ob_fval; +} PyFloatObject; + +// Macro version of PyFloat_AsDouble() trading safety for speed. +// It doesn't check if op is a double object. +#define PyFloat_AS_DOUBLE(op) (((PyFloatObject *)(op))->ob_fval) |
