Lisandro Dalcin wrote:
> Brian Granger posted some days ago about problems with multiple inheritance:
>
> http://codespeak.net/pipermail/cython-dev/2008-July/001814.html
>
> It seems that Cython is generating bad code. A C compiler (gcc) just
> warn about it, but a C++ compiler (g++)
> generates an error.
>
> A tentative patch for this issue is posted here:
>
> http://codespeak.net/pipermail/cython-dev/2008-July/001835.html
>
> If you have a bit of time, please look at this issue.
Even with the patch, the end-result seems a bit strange:
static PyObject *__pyx_tp_new_4vtab_Bam(PyTypeObject *t, PyObject *a,
PyObject *k) {
struct __pyx_obj_4vtab_Bam *p;
PyObject *o = __pyx_tp_new_4vtab_Foo(t, a, k);
if (!o) return 0;
p = ((struct __pyx_obj_4vtab_Bam *)o);
p->__pyx_base.__pyx_base.__pyx_vtab = (struct
__pyx_vtabstruct_4vtab_Foo*)__pyx_vtabptr_4vtab_Bam;
return o;
}
I.e. on vtable generation it seems to skip its immediate ancestor.
Something about symmetry just doesn't seem right about this code with or
without your patch...
I can't figure out more right now, gotta go. Perhaps tomorrow, if nobody
beats me to it. Just letting you know that this might need more care
than that patch alone.
--
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev