summaryrefslogtreecommitdiffstats
path: root/Include/intobject.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-08-02 02:41:13 (GMT)
committerGuido van Rossum <guido@python.org>1997-08-02 02:41:13 (GMT)
commit7a2d6112d95d5944b60b78232a5a75570db6e76a (patch)
treedee3ef4409be19c87a7000ec0befc04c6656c5ef /Include/intobject.h
parent2981bc7a65031f3661c401bddf78102c1e7e979e (diff)
downloadcpython-7a2d6112d95d5944b60b78232a5a75570db6e76a.zip
cpython-7a2d6112d95d5944b60b78232a5a75570db6e76a.tar.gz
cpython-7a2d6112d95d5944b60b78232a5a75570db6e76a.tar.bz2
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 d9fd68f..cd66f75 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
}