Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Modernize pyrex -> cython #29

Merged
merged 11 commits into from Jan 31, 2013

Conversation

Projects
None yet
1 participant
Owner

samrushing commented Jun 18, 2012

This started as an attempt to write a pxd file for _coro.pyx. It grew into a long-overdue modernizing of the pyrex code into cython. This means using the cpython cimport namespace rather than python.pxi (with the few exceptions instead placed at the top of _coro.pyx), and removing lots of redundant stuff like PyString_AsString. Much of this kinda thing is now done automatically by Cython, needing only a sprinkling of type annotations here and there.

I thought the best way to make a _coro.pxd was to mirror what is done in _coro.pyx - i.e., for each sub-component that is 'included', I make a pxd file for its types, and then 'include' that in _coro.pxd.

Motivation: with a pxd file, it is now possible to write pure-cython code, for example a server that is implemented completely in Cython, which should be quite competitive with a similar server written in C.

I also split socket.pyx::sock.parse_address() into pieces, and changed it to trigger off of the value of self.domain, rather than the type of the address argument. This is in preparation for support for linux raw sockets, which should be coming shortly...

@samrushing samrushing added a commit that referenced this pull request Jan 31, 2013

@samrushing samrushing Merge pull request #29 from samrushing/modernize
Modernize pyrex -> cython
81c84aa

@samrushing samrushing merged commit 81c84aa into ironport:master Jan 31, 2013

@samrushing samrushing deleted the samrushing:modernize branch Jan 31, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment