Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d943262

Browse files
author
Thomas Heller
committed
Merged revisions 69260 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r69260 | thomas.heller | 2009-02-03 18:07:40 +0100 (Di, 03 Feb 2009) | 9 lines This refactoring should make it easier to add new calling conventions. Replace ffi_call_STDCALL and ffi_call_SYSV by a ffi_call_x86 function that cleans up the stack when FFI_SYSV is used, and does nothing for FFI_STDCALL. Remove libffi_msvc\win32.S, which is out of date and also unused; it was only used for building ctypes with the MingW compiler. ........
1 parent 3bbfba8 commit d943262

3 files changed

Lines changed: 29 additions & 400 deletions

File tree

Modules/_ctypes/libffi_msvc/ffi.c

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -148,27 +148,12 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
148148
}
149149

150150
#ifdef _WIN32
151-
/*@-declundef@*/
152-
/*@-exportheader@*/
153-
extern int
154-
ffi_call_SYSV(void (*)(char *, extended_cif *),
155-
/*@out@*/ extended_cif *,
156-
unsigned, unsigned,
157-
/*@out@*/ unsigned *,
158-
void (*fn)());
159-
/*@=declundef@*/
160-
/*@=exportheader@*/
161-
162-
/*@-declundef@*/
163-
/*@-exportheader@*/
164151
extern int
165-
ffi_call_STDCALL(void (*)(char *, extended_cif *),
166-
/*@out@*/ extended_cif *,
167-
unsigned, unsigned,
168-
/*@out@*/ unsigned *,
169-
void (*fn)());
170-
/*@=declundef@*/
171-
/*@=exportheader@*/
152+
ffi_call_x86(void (*)(char *, extended_cif *),
153+
/*@out@*/ extended_cif *,
154+
unsigned, unsigned,
155+
/*@out@*/ unsigned *,
156+
void (*fn)());
172157
#endif
173158

174159
#ifdef _WIN64
@@ -209,17 +194,9 @@ ffi_call(/*@dependent@*/ ffi_cif *cif,
209194
{
210195
#if !defined(_WIN64)
211196
case FFI_SYSV:
212-
/*@-usedef@*/
213-
return ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes,
214-
cif->flags, ecif.rvalue, fn);
215-
/*@=usedef@*/
216-
break;
217-
218197
case FFI_STDCALL:
219-
/*@-usedef@*/
220-
return ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes,
221-
cif->flags, ecif.rvalue, fn);
222-
/*@=usedef@*/
198+
return ffi_call_x86(ffi_prep_args, &ecif, cif->bytes,
199+
cif->flags, ecif.rvalue, fn);
223200
break;
224201
#else
225202
case FFI_SYSV:

Modules/_ctypes/libffi_msvc/win32.S

Lines changed: 0 additions & 243 deletions
This file was deleted.

0 commit comments

Comments
 (0)