[issue12528] Implement configurable bitfield allocation strategy
Terry J. Reedy
report at bugs.python.org
Thu Sep 1 22:13:11 CEST 2011
Terry J. Reedy <tjreedy at udel.edu> added the comment:
As a (Windows) user, I would like to be able to download any working pre-compiled shared library (.dll) and access it via ctypes. The particular compiler used to compile cpythonx.y.z should not determine whether a Pythonx.y program works. The use of VSC2008 is not part of the Python3.2 definition. So I am in favor of features than makes ctypes more likely to work.
I understand that this should be easy if the datatypes sent and received are standard ints, floats, and arrays thereof, since the bit patterns are then knowable. I gather that the problem with custom bitfields is that the resulting bit pattern format is not only not documented in the .dll, but is also not determined by the external documentation (the .h files).
Does anyone know how Cython, for instance, handles this problem? Stephen Behnel recommends it as an alternative to ctypes. Does it even try to deal with bitfields?
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list