diff options
Diffstat (limited to 'cffi')
-rw-r--r-- | cffi/_cffi_include.h | 6 | ||||
-rw-r--r-- | cffi/recompiler.py | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/cffi/_cffi_include.h b/cffi/_cffi_include.h index 6e90dd8..f412fc0 100644 --- a/cffi/_cffi_include.h +++ b/cffi/_cffi_include.h @@ -231,6 +231,12 @@ static void (*_cffi_call_python_org)(struct _cffi_externpy_s *, char *); ((got_nonpos) == (expected <= 0) && \ (got) == (unsigned long long)expected) +#ifdef MS_WIN32 +# define _cffi_stdcall __stdcall +#else +# define _cffi_stdcall /* nothing */ +#endif + #ifdef __cplusplus } #endif diff --git a/cffi/recompiler.py b/cffi/recompiler.py index 914d9e7..2bb516d 100644 --- a/cffi/recompiler.py +++ b/cffi/recompiler.py @@ -1170,6 +1170,8 @@ class Recompiler: repr_arguments = ', '.join(arguments) repr_arguments = repr_arguments or 'void' name_and_arguments = '%s(%s)' % (name, repr_arguments) + if tp.abi == "__stdcall": + name_and_arguments = '_cffi_stdcall ' + name_and_arguments # def may_need_128_bits(tp): return (isinstance(tp, model.PrimitiveType) and |