[issue22732] ctypes tests don't set correct restype for intptr_t functions

2014-11-01 Thread Roundup Robot
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

[issue22732] ctypes tests don't set correct restype for intptr_t functions

2014-11-01 Thread Steve Dower
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 ___

[issue22732] ctypes tests don't set correct restype for intptr_t functions

2014-10-27 Thread Steve Dower
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

[issue22732] ctypes tests don't set correct restype for intptr_t functions

2014-10-27 Thread Antoine Pitrou
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 ___

[issue22732] ctypes tests don't set correct restype for intptr_t functions

2014-10-26 Thread Steve Dower
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

[issue22732] ctypes tests don't set correct restype for intptr_t functions

2014-10-26 Thread Antoine Pitrou
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 ___

[issue22732] ctypes tests don't set correct restype for intptr_t functions

2014-10-26 Thread eryksun
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