Tuesday, June 14, 2011

Cython backend aiming PyPy : Week 3

Last week, I worked on the implementation of pointers. It works for the global cases but special cases are not really handled : char* is converted into POINTER(c_char) instead of c_char_p (although I'm not sure if it's a big deal), however void* does not work.
I also extended Cython's python code writer to make it work with the backend. I only tested it for very basic example though.
Speaking of testing, I also looked at how Cython tests are written and I will now write automated tests, the code writer will help me do that as I think it's better to test what code the output code rather than the AST nodes.
For extern definitions unions are still to be implemented but I plan to do this later.
For this week, I plan to :
  • Write some automated tests (I would need them anyway and it will be good to start keeping track of regressions)
  • Experiment on calling C functions (in particular passing cdef'd variables as parameter of C functions)
EDIT: I also implemented the "linking" of functions

No comments:

Post a Comment