From: Guido van Rossum Date: Sat, 2 Aug 1997 02:41:13 +0000 (+0000) Subject: Add cast to PyInt_AS_LONG macro, as suggested by Marc Lemburg. X-Git-Tag: v1.5a3~160 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7a2d6112d95d5944b60b78232a5a75570db6e76a;p=python Add cast to PyInt_AS_LONG macro, as suggested by Marc Lemburg. --- 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 }