1 Feb 12:05
[Cython] Cython code fails to compile with gcc 2.95
From: Stefan Behnel <stefan_ml@...>
Subject: [Cython] Cython code fails to compile with gcc 2.95
Newsgroups: gmane.comp.python.cython.devel
Date: 2008-02-01 11:06:36 GMT
Subject: [Cython] Cython code fails to compile with gcc 2.95
Newsgroups: gmane.comp.python.cython.devel
Date: 2008-02-01 11:06:36 GMT
Hi,
I know, that's a pretty old compiler, but I know someone with a Solaris
production setup that still uses it. Here is the compile error he gets:
--------------------------------
src/lxml/lxml.etree.c: In function `__pyx_PyInt_AsLongLong':
src/lxml/lxml.etree.c:110165: parse error before `long'
src/lxml/lxml.etree.c:110167: `val' undeclared (first use in this function)
src/lxml/lxml.etree.c:110167: (Each undeclared identifier is reported only once
src/lxml/lxml.etree.c:110167: for each function it appears in.)
src/lxml/lxml.etree.c: In function `__pyx_PyInt_AsUnsignedLongLong':
src/lxml/lxml.etree.c:110185: parse error before `long'
src/lxml/lxml.etree.c:110187: `val' undeclared (first use in this function)
error: command 'gcc' failed with exit status 1
--------------------------------
The problem lies in the new type conversion functions:
--------------------------------
110156 static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x) {
110157 if (PyInt_CheckExact(x)) {
110158 return PyInt_AS_LONG(x);
110159 }
110160 else if (PyLong_CheckExact(x)) {
110161 return PyLong_AsLongLong(x);
110162 }
110163 else {
110164 PyObject* tmp = PyNumber_Int(x); if (!tmp) return
(PY_LONG_LONG)-1;
(Continue reading)
RSS Feed