summaryrefslogtreecommitdiffstats
path: root/Modules/_ctypes/_ctypes_test.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-01-31 21:08:57 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-01-31 21:08:57 (GMT)
commit0ea622a5c88b75db15d818e91ec2f57651473a66 (patch)
tree34de987a85aa4329509b04109d9c0c4cfa6d6871 /Modules/_ctypes/_ctypes_test.c
parentbd0c897332faddce4ebdd4698f976c99a70ec346 (diff)
downloadcpython-0ea622a5c88b75db15d818e91ec2f57651473a66.zip
cpython-0ea622a5c88b75db15d818e91ec2f57651473a66.tar.gz
cpython-0ea622a5c88b75db15d818e91ec2f57651473a66.tar.bz2
Issue #8275: Fix passing of callback arguments with ctypes under Win64.
Patch by Stan Mihai. Ok'ed by Georg.
Diffstat (limited to 'Modules/_ctypes/_ctypes_test.c')
-rw-r--r--Modules/_ctypes/_ctypes_test.c14
1 files changed, 14 insertions, 0 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",