[Cython] CTypes backend for Cython Status
Stefan Behnel
stefan_ml at behnel.de
Fri Sep 9 10:35:20 CEST 2011
Hi Romain,
thanks for the feedback.
Romain Guillebert, 08.09.2011 06:18:
> The Google Summer of Code has ended and I didn't give the current status
> to anyone yet (I was very busy with a report I had to write for my
> university).
>
> There is still work to do on the project (there was more work than I
> expected, especially because of semantic differences between Cython and
> ctypes) so I'll talk about what needs to be done (even if it does not
> sound good compared to talking about what has been done) from the most
> important to the least important in my opinion :
>
> - Pointer vs Array, Cython mixes the two while ctypes does not, this
> can probably be fixed by using arrays everywhere (if we can convert
> pointers into arrays)
Could you elaborate on this? Why can't you always use pointers?
> - Take into account header files declared globally
"globally" as in ... ?
And what exactly do you mean by "take header files into account"?
> - Macros, this is probably the biggest part but it's doable, Cython has
> the types of the arguments and the return value so it's possible to
> generate a C function corresponding to a macro
Agreed. I think that's the only viable solution. Won't work for all macros,
but at least for a rather large number of them.
> - Pointer to functions
I take it this isn't implemented at all? Do you mean pointers to Cython
cdef functions or also to external C defined functions?
> Some of them are trivial, others just require good ideas and macros
> demands a big amount of work.
Really? Apart from generating the rather straight forward wrapper functions
for them, what else needs to be done?
> I'm still working on it and if someone wants to give a hand, I'll be
> happy to explain what I've done.
Happy to hear that.
Stefan
More information about the cython-devel
mailing list