summaryrefslogtreecommitdiff
path: root/Include/intobject.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-08-02 02:41:13 +0000
committerGuido van Rossum <guido@python.org>1997-08-02 02:41:13 +0000
commit9988e263ab68c8e90c381179c6a2d53c2d315d51 (patch)
tree8b5d5e435396cc750a158b5516640c85e4e0fc96 /Include/intobject.h
parentd04b9fbb4729717549515442267e1bc90c3d0f52 (diff)
downloadcpython-9988e263ab68c8e90c381179c6a2d53c2d315d51.tar.gz
Add cast to PyInt_AS_LONG macro, as suggested by Marc Lemburg.
Diffstat (limited to 'Include/intobject.h')
-rw-r--r--Include/intobject.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/intobject.h b/Include/intobject.h
index d9fd68f3ee..cd66f75325 100644
--- a/Include/intobject.h
+++ b/Include/intobject.h
@@ -83,7 +83,7 @@ extern DL_IMPORT(PyIntObject) _Py_ZeroStruct, _Py_TrueStruct; /* Don't use these
#define Py_True ((PyObject *) &_Py_TrueStruct)
/* Macro, trading safety for speed */
-#define PyInt_AS_LONG(op) ((op)->ob_ival)
+#define PyInt_AS_LONG(op) (((PyIntObject *)(op))->ob_ival)
#ifdef __cplusplus
}