Add cast to PyInt_AS_LONG macro, as suggested by Marc Lemburg.

This commit is contained in:
Guido van Rossum 1997-08-02 02:41:13 +00:00
parent 2981bc7a65
commit 7a2d6112d9

View file

@ -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
}