From: Robert K. <rob...@gm...> - 2006-11-16 03:22:55
|
David Cournapeau wrote: > Hi, > > This is a bit OT, but I wasted quite some time on this time, when > using 64 bits integers and ctypes on ubuntu edgy. As I know other people > use ubuntu with numpy, this may save some headache to others. I found > this behaviour which looks like a bug in ctypes for python2.5 on edgy > ubuntu: > > python2.5 -c "from ctypes import sizeof, c_longlong; print > sizeof(c_longlong)" > > prints 4 instead of 8, which in my case is problematic for > structures alignement. This affects only python2.5, and does not affect > a python installed from sources. Can anybody else reproduce this ? Can you try a similar program in C compiled with the same C compiler that you used to build ctypes? sizeof(long long) does not have to be 8 bytes; it just has to be at least as large as sizeof(long). -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco |