[New-bugs-announce] [issue22732] ctypes tests don't set correct restype for intptr_t functions
report at bugs.python.org
Sun Oct 26 21:32:06 CET 2014
New submission from Steve Dower:
The test_pass_pointer and test_int_pointer_arg tests are inconsistent between 32-bit and 64-bit builds because c_long is always 32 bits but the function being called may return a 64-bit value (it's a pointer, so c_long may truncate it).
I'd prefer to have a c_intptr type to use, but this patch uses c_longlong in the test if that's the size of a pointer.
Just looking for a quick review so I can check this into default. Not sure why it doesn't repro with VC10, but it certainly does with later compilers.
components: Tests, ctypes
nosy: amaury.forgeotdarc, belopolsky, meador.inge, steve.dower
stage: patch review
title: ctypes tests don't set correct restype for intptr_t functions
versions: Python 3.5
Added file: http://bugs.python.org/file37022/test_ctypes.patch
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce