This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients Michael.Felt, martin.panter
Date 2016-07-30.00:51:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1469839915.17.0.167633993095.issue27643@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-07-30 00:51:55martin.pantersetrecipients: + martin.panter, Michael.Felt
2016-07-30 00:51:55martin.pantersetmessageid: <1469839915.17.0.167633993095.issue27643@psf.upfronthosting.co.za>
2016-07-30 00:51:55martin.panterlinkissue27643 messages
2016-07-30 00:51:53martin.pantercreate