From: Stefan Behnel Date: Fri, 1 Feb 2008 13:30:17 +0000 (+0100) Subject: fix gcc 2.95 compile issue X-Git-Tag: 0.9.6.14~29^2~37^2~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=20ad25cf6b78b216b9f14023735d691a4d9290f2;p=cython.git fix gcc 2.95 compile issue --- diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py index 476a2336..4bd1db1c 100644 --- a/Cython/Compiler/PyrexTypes.py +++ b/Cython/Compiler/PyrexTypes.py @@ -1081,8 +1081,9 @@ static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x) { return PyLong_AsLongLong(x); } else { + PY_LONG_LONG val; PyObject* tmp = PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1; - PY_LONG_LONG val = __pyx_PyInt_AsLongLong(tmp); + val = __pyx_PyInt_AsLongLong(tmp); Py_DECREF(tmp); return val; } @@ -1101,8 +1102,9 @@ static INLINE unsigned PY_LONG_LONG __pyx_PyInt_AsUnsignedLongLong(PyObject* x) return PyLong_AsUnsignedLongLong(x); } else { + PY_LONG_LONG val; PyObject* tmp = PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1; - PY_LONG_LONG val = __pyx_PyInt_AsUnsignedLongLong(tmp); + val = __pyx_PyInt_AsUnsignedLongLong(tmp); Py_DECREF(tmp); return val; }