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.

----------
assignee: steve.dower
components: Tests, ctypes
files: test_ctypes.patch
keywords: patch
messages: 230035
nosy: amaury.forgeotdarc, belopolsky, meador.inge, steve.dower
priority: normal
severity: normal
stage: patch review
status: open
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 <rep...@bugs.python.org>
<http://bugs.python.org/issue22732>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to