Lisandro Dalcin wrote:
> On Tue, Jul 7, 2009 at 4:31 PM, Dag Sverre
> Seljebotn<[email protected]> wrote:
>> if (sizeof(signed long) != sizeof(MPI_Aint) || (MPI_Aint)-1 != -1
>> || (MPI_Aint)1 / 2 != 0) {
>> PyErr_String(PyExc_RuntimeError, "MPI_Aint is not 'signed int' on
>> this system (consider declaring it as 'cdef signed int? MPI_Aint' if
>> the size is not known in the Cython code)");
>> }
>>
>
> I'm strongly -1 on this.
>
> If we ever do this, it will be impossible for a mpi4py release to ship
> the generated C sources... Cython will be required at build time to
> generate the C sources, plus some 'configure'-like step to figure out
> the right C type in order to hot-fix the Cython code, and all that
> implemented in pure distutils (you likely know how hard that is) for
> maximum compatibility...
I think you misunderstood my suggestion. No configure step needed.
Basically it would take
cdef extern from ...:
ctypedef FOO BAR
and turn into C code, like the above, containing sizeof(FOO) and
sizeof(BAR), to validate that it holds true.
That's all.
--
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev