[pypy-issue] [issue997] PyCrypto fails to build with pypy/cpyext
Amaury Forgeot d Arc
tracker at bugs.pypy.org
Tue Jan 10 23:20:11 CET 2012
Amaury Forgeot d Arc <amauryfa at gmail.com> added the comment:
Unfortunately PyCrypto accesses the internal representation of PyLong objects, which pypy cannot expose. This part of
PyCrypto (in _fastmath.c: mpzToLongObj and longObjToMPZ) has to be modified before pypy can compile this module.
Unfortunately the CPython API does not provide many alternatives. _PyLong_FromByteArray() could be used, but it requires
an additional copy and would be slower.
The best would be to invent a new CPython API: PyLong_GET_DIGITS() and PyLong_GET_SIZE(), which PyPy could implement like
the string object and allow a mutable buffer until the object exits the function.
----------
nosy: +afa
status: unread -> chatting
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue997>
________________________________________
More information about the pypy-issue
mailing list