[Python-checkins] r46730 - python/trunk/Modules/_ctypes/callproc.c
thomas.heller
python-checkins at python.org
Wed Jun 7 22:43:07 CEST 2006
Author: thomas.heller
Date: Wed Jun 7 22:43:06 2006
New Revision: 46730
Modified:
python/trunk/Modules/_ctypes/callproc.c
Log:
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.
Modified: python/trunk/Modules/_ctypes/callproc.c
==============================================================================
--- python/trunk/Modules/_ctypes/callproc.c (original)
+++ python/trunk/Modules/_ctypes/callproc.c Wed Jun 7 22:43:06 2006
@@ -969,7 +969,9 @@
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
More information about the Python-checkins
mailing list