mirror of https://github.com/python/cpython
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.
This commit is contained in:
parent
d5474eaed7
commit
861acee048
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue