Santoso Wijaya <santoso.wij...@gmail.com> added the comment: 32-bit (2.6) is fine:
D:\Temp\cdll\Release>C:\Python26\python.exe Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from ctypes import * >>> libcdll = CDLL('cdll') >>> class MyStruct(Structure): ... _fields_ = [] ... for name in ('a', 'b', 'c', 'd', 'e', 'f', 'g'): ... _fields_.append((name, c_int32)) ... >>> MyStruct._fields_ [('a', <class 'ctypes.c_long'>), ('b', <class 'ctypes.c_long'>), ('c', <class 'c types.c_long'>), ('d', <class 'ctypes.c_long'>), ('e', <class 'ctypes.c_long'>), ('f', <class 'ctypes.c_long'>), ('g', <class 'ctypes.c_long'>)] >>> s1 = MyStruct(1, 2, 3, 4, 5, 6, 7) >>> s2 = MyStruct(0, 9, 8, 7, 6, 5, 4) >>> 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: 0; s2.b: 9; s2.c: 8; s2.d: 7; s2.e: 6; s2.f: 5; s2.g: 4 x: 42 0 >>> ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11835> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com