summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-01-31 21:36:33 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-01-31 21:36:33 (GMT)
commit2e811c92c78e99cfd4b0bc463bea956cd96d6751 (patch)
treee2d6d0dc7c2e9955d4899cf12b228e78713b1f68 /Modules
parent070f050c3aaf8b67477426afd40465122d749906 (diff)
downloadcpython-2e811c92c78e99cfd4b0bc463bea956cd96d6751.zip
cpython-2e811c92c78e99cfd4b0bc463bea956cd96d6751.tar.gz
cpython-2e811c92c78e99cfd4b0bc463bea956cd96d6751.tar.bz2
Merged revisions 88284 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88284 | antoine.pitrou | 2011-01-31 22:08:57 +0100 (lun., 31 janv. 2011) | 4 lines Issue #8275: Fix passing of callback arguments with ctypes under Win64. Patch by Stan Mihai. Ok'ed by Georg. ........
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ctypes/_ctypes_test.c14
-rw-r--r--Modules/_ctypes/libffi_msvc/ffi.c2
2 files changed, 15 insertions, 1 deletions
diff --git a/Modules/_ctypes/_ctypes_test.c b/Modules/_ctypes/_ctypes_test.c
index 36bd0a1..3a6845f 100644
--- a/Modules/_ctypes/_ctypes_test.c
+++ b/Modules/_ctypes/_ctypes_test.c
@@ -12,6 +12,20 @@
/* some functions handy for testing */
+EXPORT(int)
+_testfunc_cbk_reg_int(int a, int b, int c, int d, int e,
+ int (*func)(int, int, int, int, int))
+{
+ return func(a*a, b*b, c*c, d*d, e*e);
+}
+
+EXPORT(double)
+_testfunc_cbk_reg_double(double a, double b, double c, double d, double e,
+ double (*func)(double, double, double, double, double))
+{
+ return func(a*a, b*b, c*c, d*d, e*e);
+}
+
EXPORT(void)testfunc_array(int values[4])
{
printf("testfunc_array %d %d %d %d\n",
diff --git a/Modules/_ctypes/libffi_msvc/ffi.c b/Modules/_ctypes/libffi_msvc/ffi.c
index 763d179..7a7348b 100644
--- a/Modules/_ctypes/libffi_msvc/ffi.c
+++ b/Modules/_ctypes/libffi_msvc/ffi.c
@@ -379,7 +379,7 @@ ffi_prep_closure (ffi_closure* closure,
short bytes;
char *tramp;
#ifdef _WIN64
- int mask;
+ int mask = 0;
#endif
FFI_ASSERT (cif->abi == FFI_SYSV);