[Python-checkins] r46698 - python/trunk/Modules/_ctypes/callproc.c
thomas.heller
python-checkins at python.org
Tue Jun 6 20:50:47 CEST 2006
Author: thomas.heller
Date: Tue Jun 6 20:50:46 2006
New Revision: 46698
Modified:
python/trunk/Modules/_ctypes/callproc.c
Log:
Add a hack so that foreign functions returning float now do work on 64-bit
big endian platforms.
Modified: python/trunk/Modules/_ctypes/callproc.c
==============================================================================
--- python/trunk/Modules/_ctypes/callproc.c (original)
+++ python/trunk/Modules/_ctypes/callproc.c Tue Jun 6 20:50:46 2006
@@ -964,7 +964,12 @@
address cannot simply be used as result pointer, instead we must
adjust the pointer value:
*/
- if (rtype->size < sizeof(ffi_arg))
+ /*
+ XXX I should find out and clarify why this is needed at all,
+ 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))
resbuf = (char *)resbuf + sizeof(ffi_arg) - rtype->size;
#endif
More information about the Python-checkins
mailing list