The former 'bjoernmodule.c' file (the one you imported with 'import bjoern') has been reimplemented in Python. This Python code contains high-level socket handling. The interface to the C server code is now no more than the 'bjoern.server_run(sock, wsgi_app)' function which is passed a PYTHON socket and the WSGI application. This allows to run bjoern on arbitrary socket(-like) objects, easing integration with 3rd party frameworks. The old high-level API ('bjoern.run', 'bjoern.listen') remains intact. This refactoring has been motivation by issue #73.
There are a few fixes in here: * read(3) returns a regular ssize_t; don't use Py_ssize_t * Request_parse wants a size_t, not an ssize_t * server_run takes no arguments, so declare it void * tp_newfunc should have type (newfunc) (i.e. takes PyTypeObject* as its first parameter, instead of PyObject*)