[pypy-commit] pypy merge-2.7.2: Update _ctypes_test.c from CPython 2.7.2

amauryfa noreply at buildbot.pypy.org
Sun Jan 22 20:57:16 CET 2012


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: merge-2.7.2
Changeset: r51664:ead17cd9edbf
Date: 2012-01-22 20:49 +0100
http://bitbucket.org/pypy/pypy/changeset/ead17cd9edbf/

Log:	Update _ctypes_test.c from CPython 2.7.2

diff --git a/lib_pypy/_ctypes_test.c b/lib_pypy/_ctypes_test.c
--- a/lib_pypy/_ctypes_test.c
+++ b/lib_pypy/_ctypes_test.c
@@ -26,6 +26,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",


More information about the pypy-commit mailing list