Martin Panter added the comment:

Looks like your Python 3 build is messed up. Maybe it doesn’t like running from 
a different directory. I would try from the main build directory, and note the 
test_bitfields has an S:

./python -m unittest -v ctypes.test.test_bitfields

What I am suggesting as a fix is to change line 381 from plain “int” to “signed 
int”, and 382 to “signed short”. I can make a patch later if that will help. 
Hopefully with these changes the C compiler will use signed integer logic, 
matching what I believe the ctypes library uses for c_int and c_short.

Using a type other than short is not right, because the Python test is 
explicitly trying to test c_short behaviour. If your compiler does not support 
“signed short” bitfields, maybe we just have to accept that ctypes supports it 
even though the compiler doesn’t, and skip the test.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27643>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to