dlitz/pycrypto — pull request #59 by Legrandin (2013-08-25 15:48:08+00:00)
Title: Make PyCrypto work with PyPy

With this set of patches, PyCrypto works under PyPy.

The main change concerns the 2 routines `longObjToMPZ` and `mpzToLongObj` in `_fastmath.c`.
They have been completely changed so that they don't access the internals of a PyLong anymore (which are not exposed by PyPy).
Even though the new routines are less efficient, I didn't notice any significant performance degradation with CPython; that probably means these routines are not a hotspots anyway. I left one of the two routines only for Python < 2.7; the alternative was to backport `PyLong_AsLongAndOverflow`.

The interesting thing is that PyCrypto is **slower** under PyPy compared to CPython by a 30% factor.