Commit 861acee0 authored by Thomas Heller's avatar Thomas Heller

Fix for foreign functions returning small structures on 64-bit big

endian machines.  Should fix the remaininf failure in the PPC64
Debian buildbot.

Thanks to Matthias Klose for providing access to a machine to debug
and test this.
parent d5474eae
......@@ -969,7 +969,9 @@ PyObject *_CallProc(PPROC pProc,
especially why adjusting for ffi_type_float must be avoided on
64-bit platforms.
*/
if (rtype->type != FFI_TYPE_FLOAT && rtype->size < sizeof(ffi_arg))
if (rtype->type != FFI_TYPE_FLOAT
&& rtype->type != FFI_TYPE_STRUCT
&& rtype->size < sizeof(ffi_arg))
resbuf = (char *)resbuf + sizeof(ffi_arg) - rtype->size;
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment