Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7a2d611

Browse files
committed
Add cast to PyInt_AS_LONG macro, as suggested by Marc Lemburg.
1 parent 2981bc7 commit 7a2d611

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Include/intobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ extern DL_IMPORT(PyIntObject) _Py_ZeroStruct, _Py_TrueStruct; /* Don't use these
8383
#define Py_True ((PyObject *) &_Py_TrueStruct)
8484

8585
/* Macro, trading safety for speed */
86-
#define PyInt_AS_LONG(op) ((op)->ob_ival)
86+
#define PyInt_AS_LONG(op) (((PyIntObject *)(op))->ob_ival)
8787

8888
#ifdef __cplusplus
8989
}

0 commit comments

Comments
 (0)