summaryrefslogtreecommitdiff
path: root/cffi/recompiler.py
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2016-02-04 07:40:38 +0100
committerArmin Rigo <arigo@tunes.org>2016-02-04 07:40:38 +0100
commite4db24a1b11a232b833c0f49c1f9634734318280 (patch)
tree1b861a2b981e9e42ce77b61cc3d521a132880c35 /cffi/recompiler.py
parentc62ba7852146c9fe595c91eaf305161bf6ccf6e1 (diff)
downloadcffi-e4db24a1b11a232b833c0f49c1f9634734318280.tar.gz
Issue #245: __stdcall not generated correctly on extern "Python" functions
Diffstat (limited to 'cffi/recompiler.py')
-rw-r--r--cffi/recompiler.py2
1 files changed, 2 insertions, 0 deletions
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