David Cournapeau wrote:
> Robert Kern wrote:
>   
>> 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).
>>
>>   
>>     
> I thought that ISO C99 required long long to be at least 64 bits, and 
> that gcc followed this by default:
>   
Ok, I found the problem: python 2.5 is configured with the option   
--with-system-ffi. If I compile python2.5 original sources with this 
option, I have the same problem, so it looks like a ffi-related problem. 
I will investigate this, because this is really annoying, but this has 
nothing to do with python nor numpy anymore,

cheers,

David



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to