]> granicus.if.org Git - python/commitdiff
Add cast to PyInt_AS_LONG macro, as suggested by Marc Lemburg.
authorGuido van Rossum <guido@python.org>
Sat, 2 Aug 1997 02:41:13 +0000 (02:41 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 2 Aug 1997 02:41:13 +0000 (02:41 +0000)
Include/intobject.h

index d9fd68f3eee7463d26c6dbe3043d9ca4872b08c2..cd66f75325e48c5f6d626a4d4c5f46163c7c81ef 100644 (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
 }