From 2981bc7a65031f3661c401bddf78102c1e7e979e Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 2 Aug 1997 02:40:58 +0000 Subject: [PATCH] Add cast to PyFloat_AS_DOUBLE macro, as suggested by Marc Lemburg. --- Include/floatobject.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Include/floatobject.h b/Include/floatobject.h index 1c615f517db..c4a356a7e7a 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 }