Add cast to PyFloat_AS_DOUBLE macro, as suggested by Marc Lemburg.

This commit is contained in:
Guido van Rossum 1997-08-02 02:40:58 +00:00
parent d0924f4585
commit 2981bc7a65
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ extern PyObject *PyFloat_FromDouble Py_PROTO((double));
extern double PyFloat_AsDouble Py_PROTO((PyObject *));
/* Macro, trading safety for speed */
#define PyFloat_AS_DOUBLE(op) ((op)->ob_fval)
#define PyFloat_AS_DOUBLE(op) (((PyFloatObject *)(op))->ob_fval)
#ifdef __cplusplus
}