From: Guido van Rossum Date: Sat, 2 Aug 1997 02:40:58 +0000 (+0000) Subject: Add cast to PyFloat_AS_DOUBLE macro, as suggested by Marc Lemburg. X-Git-Tag: v1.5a3~161 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2981bc7a65031f3661c401bddf78102c1e7e979e;p=thirdparty%2FPython%2Fcpython.git Add cast to PyFloat_AS_DOUBLE macro, as suggested by Marc Lemburg. --- diff --git a/Include/floatobject.h b/Include/floatobject.h index 1c615f517db8..c4a356a7e7aa 100644 --- a/Include/floatobject.h +++ b/Include/floatobject.h @@ -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 }