From 20ad25cf6b78b216b9f14023735d691a4d9290f2 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 1 Feb 2008 14:30:17 +0100 Subject: [PATCH] fix gcc 2.95 compile issue --- Cython/Compiler/PyrexTypes.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; } -- 2.26.2