[Pyrex] Pyrex and gcc 4.0

Francesc Altet faltet at carabos.com
Mon Feb 21 13:58:53 CET 2005


Hi,

I'm having a problem compiling a Pyrex generated Python extension with
gcc 4.0 and AMD64. I get the following error:

src/hdf5Extension.c:12974: error: invalid lvalue in assignment
src/hdf5Extension.c: In function '__pyx_tp_new_13hdf5Extension_Array':

With the next patch, the extension can be generated without problems:

diff -urN ../tmp-orig/pytables-0.9.1/src/hdf5Extension.c
 ./src/hdf5Extension.c --- ../tmp-orig/pytables-0.9.1/src/hdf5Extension.c    
  2004-12-02
14:17:54.000000000 +0100
+++ ./src/hdf5Extension.c       2004-12-31 09:26:46.000000000 +0100
@@ -12971,7 +12971,7 @@
 static PyObject *__pyx_tp_new_13hdf5Extension_Row(PyTypeObject *t, PyObject
*a, PyObject *k) {
   PyObject *o = (*t->tp_alloc)(t, 0);
   struct __pyx_obj_13hdf5Extension_Row *p = (struct
__pyx_obj_13hdf5Extension_Row *)o;
-  (struct __pyx_vtabstruct_13hdf5Extension_Row *)p->__pyx_vtab =
__pyx_vtabptr_13hdf5Extension_Row;
+  p->__pyx_vtab = __pyx_vtabptr_13hdf5Extension_Row;
   p->_table = Py_None; Py_INCREF(p->_table);
   p->_fields = Py_None; Py_INCREF(p->_fields);
   p->_recarray = Py_None; Py_INCREF(p->_recarray);


By the way, the patched code also works with gcc3.x

Cheers and thanks for Pyrex!,

-- 
>qo<   Francesc Altet     http://www.carabos.com/
V  V   Cárabos Coop. V.   Enjoy Data
 ""




More information about the Pyrex mailing list