[issue24290] c_uint32 bitfields break structures

2015-05-27 Thread Rony Batista
Rony Batista added the comment: Well, looks like the issue is with 64 bit mode then. For the first 5 cases the right answer is 69.95930480957031, and for the last 2 its -69.95930480957031. The results for the 32 bit mode are all correct. -- ___ Pyth

[issue24290] c_uint32 bitfields break structures

2015-05-26 Thread Ned Deily
Ned Deily added the comment: Without diving into the details of your test program, I get the same results on a 64-bit Debian Python 2.7.9 as with a 64-bit OS X 2.7.10: c_uint32 TESTS: Class Name exponentnumber Signfloat binary repr IEEE754Flo

[issue24290] c_uint32 bitfields break structures

2015-05-26 Thread Rony Batista
Rony Batista added the comment: Silly me, Heres the code. -- Added file: http://bugs.python.org/file39508/ctypesBug.py ___ Python tracker ___

[issue24290] c_uint32 bitfields break structures

2015-05-26 Thread Ronald Oussoren
Ronald Oussoren added the comment: You forgot to actually attach the code. -- nosy: +ronaldoussoren ___ Python tracker ___ ___ Python-

[issue24290] c_uint32 bitfields break structures

2015-05-26 Thread Rony Batista
New submission from Rony Batista: ctypes Structures with c_uint32 bitfields have strange behaviour on OS X. In the attached code when the field "number" is set, it changes the whole 32 bits, even thou its meant to be 23 bits. The behavior is unexpected in: OS X: Python 2.7.9 The behavior is a