diff options
author | Thomas Heller <theller@ctypes.org> | 2007-09-07 09:33:24 (GMT) |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2007-09-07 09:33:24 (GMT) |
commit | 2e638c3a8a0114f6c04022019e78393331d5baaa (patch) | |
tree | aa16583420e798286b97ae510fe5afeb24330928 /Lib | |
parent | 49c7c71d9f2cd3576581088006400f7ca1ff73b2 (diff) | |
download | cpython-2e638c3a8a0114f6c04022019e78393331d5baaa.zip cpython-2e638c3a8a0114f6c04022019e78393331d5baaa.tar.gz cpython-2e638c3a8a0114f6c04022019e78393331d5baaa.tar.bz2 |
Backport from py3k branch:
Add a workaround for a strange bug on win64, when _ctypes is compiled
with the SDK compiler. This should fix the failing
Lib\ctypes\test\test_as_parameter.py test.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/ctypes/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py index 3ad3161..2e35307 100644 --- a/Lib/ctypes/__init__.py +++ b/Lib/ctypes/__init__.py @@ -545,3 +545,9 @@ for kind in [c_ushort, c_uint, c_ulong, c_ulonglong]: elif sizeof(kind) == 4: c_uint32 = kind elif sizeof(kind) == 8: c_uint64 = kind del(kind) + +# XXX for whatever reasons, creating the first instance of a callback +# function is needed for the unittests on Win64 to succeed. This MAY +# be a compiler bug, since the problem occurs only when _ctypes is +# compiled with the MS SDK compiler. Or an uninitialized variable? +CFUNCTYPE(c_int)(lambda: None) |