[issue27743] Python 2 has a wrong artificial limit on the amount of memory that can be allocated in ctypes

Eryk Sun report at bugs.python.org
Fri Aug 12 06:58:29 EDT 2016


Eryk Sun added the comment:

AFAIK this only affects Windows. It looks like a relatively simple fix. In PyCArrayType_new, change the declaration of `length` to Py_ssize_t to match the definition StgDictObject.length; ensure the _length_ attribute is an index via PyIndex_Check instead of PyInt_Check; and call PyNumber_AsSsize_t instead of PyInt_AS_LONG.

----------
components: +Windows
nosy: +eryksun, paul.moore, tim.golden, zach.ware

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27743>
_______________________________________


More information about the Python-bugs-list mailing list