Message271659
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. |
|
Date |
User |
Action |
Args |
2016-07-30 00:51:55 | martin.panter | set | recipients:
+ martin.panter, Michael.Felt |
2016-07-30 00:51:55 | martin.panter | set | messageid: <1469839915.17.0.167633993095.issue27643@psf.upfronthosting.co.za> |
2016-07-30 00:51:55 | martin.panter | link | issue27643 messages |
2016-07-30 00:51:53 | martin.panter | create | |
|