[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2016-08-05 Thread Patrick Stewart

Patrick Stewart added the comment:

Actually the current released version of libffi (3.2.1) is even more severely 
broken on win64, you can't return structs at all. (patch here 
https://github.com/patstew/MINGW-packages/blob/9c3910fa32c45448826a2241c3fba3bf6abf9428/mingw-w64-libffi/fix_return_size.patch).
 They've rewritten it all in git, so hopefully the next version will work.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20160>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2016-08-03 Thread Patrick Stewart

Patrick Stewart added the comment:

There's some confusion above about clang - that's completely irrelevant, the 
problem was using ctypes to call into libclang, not using clang to compile 
anything. The problem applies to any callback function that returns a struct 
larger than 8 bytes with any MSVC 64bit build of ctypes.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20160>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17310] Ctypes callbacks shows problem on Windows Python (64bit)

2016-07-21 Thread Patrick Stewart

Patrick Stewart added the comment:

I've attached a patch with an extra fix to the duplicated issue 20160 
http://bugs.python.org/issue20160

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17310>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2016-07-21 Thread Patrick Stewart

Patrick Stewart added the comment:

This is still a problem, and the suggested fix seems to work. There is another 
error a few lines above where it is allocating 4 bytes for a pointer. I've 
attached a new patch with both fixes, but without Bob's tests.
This issue is a duplicate of 17310

--
nosy: +Patrick Stewart
Added file: http://bugs.python.org/file43807/ffi_msvc.patch

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20160>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17310] Ctypes callbacks shows problem on Windows Python (64bit)

2016-07-20 Thread Patrick Stewart

Patrick Stewart added the comment:

This also fixes python 3.5

--
nosy: +Patrick Stewart

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17310>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com