Skip to content

Commit 2981bc7

Browse files
committed
Add cast to PyFloat_AS_DOUBLE macro, as suggested by Marc Lemburg.
1 parent d0924f4 commit 2981bc7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Include/floatobject.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ extern PyObject *PyFloat_FromDouble Py_PROTO((double));
5454
extern double PyFloat_AsDouble Py_PROTO((PyObject *));
5555

5656
/* Macro, trading safety for speed */
57-
#define PyFloat_AS_DOUBLE(op) ((op)->ob_fval)
57+
#define PyFloat_AS_DOUBLE(op) (((PyFloatObject *)(op))->ob_fval)
5858

5959
#ifdef __cplusplus
6060
}

0 commit comments

Comments
 (0)