Roundup Robot added the comment:
New changeset a944fe09fae8 by Steve Dower in branch 'default':
#22732 ctypes tests don't set correct restype for intptr_t functions
https://hg.python.org/cpython/rev/a944fe09fae8
--
nosy: +python-dev
___
Python
Changes by Steve Dower steve.do...@microsoft.com:
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22732
___
Steve Dower added the comment:
I missed c_size_t somehow, but as eryksun says, it's not strictly the same
thing. Of course, my current patch isn't the same thing either as it only
supports 32-bit and 64-bit pointer sizes.
I could make a bigger change to use c_void_p and compare its .value
Antoine Pitrou added the comment:
Well, if c_size_t is incorrect, then let's go with the patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22732
___
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
Antoine Pitrou added the comment:
Why not use c_size_t? Or is that incorrect in some cases?
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22732
___
eryksun added the comment:
Why not use c_size_t? Or is that incorrect in some cases?
Strictly speaking, size_t doesn't have to encompass the entire addressable
range, such as for architectures that use segmented addressing (e.g. near and
far pointers). Practically speaking, no platform