ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ctypes-users
ctypes-users
[ctypes-users] Problems with 64 signed integer
by David Cournapeau other posts by this author
Nov 23 2006 8:21PM messages near this date
| Re: [ctypes-users] Problems with 64 signed integer
Hi,

    I recently developed small wrappers around some C libraries, which 
worked find under python2.4 + ctypes 1.0.1, but failed with python 2.5.
    After investigation, the problem is that for some reason, 
c_longlong, which was 8 bytes under python2.4, is 4 under python2.5. 
Also, importing c_int64 fails (not found error) under python2.5 (I 
replaced c_longlong with c_int64 since, the latter being a much easier 
to find error). All this with the dapper ubuntu package.
    The error is seemed to be because ubuntu python2.5 packages use a 
packaged libffi4 instead of the libffi furnished by ctypes, and as such, 
python2.5 is configured with the option --with-system-ffi.

    My questions are:
       - is this intended for c_longlong to be only 4 bytes in some 
cases ? (in ISO C99, my understanding was that long long was guaranteed 
to be at least 8 bytes)
       - is the lack of c_int64 of bug of ctypes, libffi, both ?
       - I try to understand where the problem lies, but I don't have 
much knowledge on python C Api, so I am a bit lost in the code of ctypes

    Thank you,

    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
_______________________________________________
ctypes-users mailing list
ctypes-users@[...].net
https://lists.sourceforge.net/lists/listinfo/ctypes-users
Thread:
David Cournapeau
Thomas Heller

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved