diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_ctypes/callproc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index 31c5f10..8108498 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -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 |