Add cast to PyFloat_AS_DOUBLE macro, as suggested by Marc Lemburg.
This commit is contained in:
parent
d0924f4585
commit
2981bc7a65
|
@ -54,7 +54,7 @@ extern PyObject *PyFloat_FromDouble Py_PROTO((double));
|
||||||
extern double PyFloat_AsDouble Py_PROTO((PyObject *));
|
extern double PyFloat_AsDouble Py_PROTO((PyObject *));
|
||||||
|
|
||||||
/* Macro, trading safety for speed */
|
/* Macro, trading safety for speed */
|
||||||
#define PyFloat_AS_DOUBLE(op) ((op)->ob_fval)
|
#define PyFloat_AS_DOUBLE(op) (((PyFloatObject *)(op))->ob_fval)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue