This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mgiuca
Recipients mgiuca, theller, tim.maxwell
Date 2008-08-16.05:56:39
SpamBayes Score 8.1076e-05
Marked as misclassified No
Message-id <1218866201.77.0.912368200713.issue3547@psf.upfronthosting.co.za>
In-reply-to
Content
Confirmed in HEAD for Python 2.6 and 3.0, on Linux.

Python 2.6b2+ (trunk:65708, Aug 16 2008, 15:04:13) 
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2

Python 3.0b2+ (py3k:65708, Aug 16 2008, 15:09:19) 
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2

I was also able to simplify the test case. I get this issue just using
one c_short and one c_long, with nonstandard bit lengths. eg:

fields = [('a', c_short, 16), ('b', c_long, 16)]

(sizeof(c_short) == 2 and sizeof(c_long) == 4).

But it's somewhat sporadic under which conditions it happens and which
it doesn't.

One might imagine this was a simple calculation. But the _ctypes module
is so big (5000 lines of C); at an initial glance I can't find the code
responsible! Any hints? (Modules/_ctypes/ctypes.c presumably is where
this takes place).
History
Date User Action Args
2008-08-16 05:56:42mgiucasetrecipients: + mgiuca, theller, tim.maxwell
2008-08-16 05:56:41mgiucasetmessageid: <1218866201.77.0.912368200713.issue3547@psf.upfronthosting.co.za>
2008-08-16 05:56:40mgiucalinkissue3547 messages
2008-08-16 05:56:39mgiucacreate