[issue22781] ctypes: Differing results between Python and C.

2014-11-01 Thread Geoff Clements
Geoff Clements added the comment: Thank you eryksun for the explanation. It's much appreciated. I'll take a look at CFFI. On 1 Nov 2014 22:38, "eryksun" wrote: > > eryksun added the comment: > > ctypes doesn't always handle bitfields correctly. In particula

[issue22781] ctypes: Differing results between Python and C.

2014-11-01 Thread Geoff Clements
Geoff Clements added the comment: Thanks for the comment Antoine. I understand that ctypeslib is old but it produces relatively mundane python code which is python version agnostic. Well, that's how it looks to me. I have not used cython mainly because it would make the distribution

[issue22781] ctypes: Differing results between Python and C.

2014-11-01 Thread Geoff Clements
New submission from Geoff Clements: I have used ctypes to create a binding to libdvdread but I am getting some bad values back from libdvdread when using python. I have used ctypeslib to generate the python bindings, i.e. h2xml and xml2py and, as far as I can tell, the bind is a faithful