[Pyrex] Please support C++

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Oct 19 11:16:11 CEST 2005


Lenard Lindstrom wrote:

> The necessary C cast for __pyx_v_array1 was added automatically.
> No Pyrex cast was needed.

Hmmm, someone must have got confused somewhere, then,
because the OP seemed to be claiming he was getting a
warning from the C compiler about incompatible pointers.
I guess I should have actually tried his example instead
of jumping to conclusions.

> But it only works because extension type
> rvalues are always cast and treated as (PyObject *).

Yes, it's probably something of an accident that it
happens to work at the moment.

 > I suppose
 > all static global and local variables can be PyObject * at the C
 > level. But anything imported or exported has to be treated properly.

I was thinking about that after I sent the last message.
Both possibilities really need to be taken into account
somehow.

Greg



More information about the Pyrex mailing list