summaryrefslogtreecommitdiff
path: root/Include/floatobject.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-08-02 02:40:58 +0000
committerGuido van Rossum <guido@python.org>1997-08-02 02:40:58 +0000
commitd04b9fbb4729717549515442267e1bc90c3d0f52 (patch)
tree90ccbcbc894853cebd88c10702c3f539d107062a /Include/floatobject.h
parentb29f0689187ce60f35c7103c8fbb6f5f7520da60 (diff)
downloadcpython-d04b9fbb4729717549515442267e1bc90c3d0f52.tar.gz
Add cast to PyFloat_AS_DOUBLE macro, as suggested by Marc Lemburg.
Diffstat (limited to 'Include/floatobject.h')
-rw-r--r--Include/floatobject.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/floatobject.h b/Include/floatobject.h
index 1c615f517d..c4a356a7e7 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
}