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 santoso.wijaya
Recipients Abraham.Soedjito, santoso.wijaya, theller
Date 2011-04-12.18:00:32
SpamBayes Score 4.1043003e-07
Marked as misclassified No
Message-id <1302631233.15.0.0343160936163.issue11835@psf.upfronthosting.co.za>
In-reply-to
Content
I can reproduce this with 2.7 and 3.2 64-bit builds on Windows:

D:\Temp\cdll\x64\Release>C:\Python32\python.exe
Python 3.2 (r32:88445, Feb 20 2011, 21:30:00) [MSC v.1500 64 bit (AMD64)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes import *
>>> libcdll = CDLL('cdll')
>>> libcdll.foo(1, 2, 3, 4, 5, 6, 7)
a: 1; b: 2; c: 3; d: 4; e: 5; f: 6; g: 7
0
>>> class MyStruct(Structure):
...     _fields_ = [
... ('a', c_int32),
... ('b', c_int32),
... ('c', c_int32),
... ('d', c_int32),
... ('e', c_int32),
... ('f', c_int32),
... ('g', c_int32),
... ]
...
>>> s1 = MyStruct(1, 2, 3, 4, 5, 6, 7)
>>> s2 = MyStruct(0, 9, 8, 7, 6, 5, 4)
>>> libcdll.bar(s2)
s.a: 0; s.b: 9; s.c: 8; s.d: 7; s.e: 6; s.f: 5; s.g: 4
0
>>> libcdll.errorPassingParameter(s1, s2, 42)
s1.a: 1; s1.b: 2; s1.c: 3; s1.d: 4; s1.e: 5; s1.f: 6; s1.g: 7
s2.a: 28; s2.b: 0; s2.c: 851972; s2.d: 0; s2.e: 31545776; s2.f: 0; s2.g: 0
x: 39805032
0
>>>
History
Date User Action Args
2011-04-12 18:00:33santoso.wijayasetrecipients: + santoso.wijaya, theller, Abraham.Soedjito
2011-04-12 18:00:33santoso.wijayasetmessageid: <1302631233.15.0.0343160936163.issue11835@psf.upfronthosting.co.za>
2011-04-12 18:00:32santoso.wijayalinkissue11835 messages
2011-04-12 18:00:32santoso.wijayacreate