Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r78:7282685432ce
Date: 2014-11-18 18:12 +0100
http://bitbucket.org/cffi/creflect/changeset/7282685432ce/

Log:    add a passing test

diff --git a/test/codegen/func-003b.c b/test/codegen/func-003b.c
new file mode 100644
--- /dev/null
+++ b/test/codegen/func-003b.c
@@ -0,0 +1,21 @@
+typedef int(*func_t)(long, ...);
+
+# ____________________________________________________________
+
+void testfunc_003b(crx_builder_t *cb)
+{
+    crx_type_t *t1, *t2, *a3[1], *t4, *t5;
+    {
+        func_t *p1;
+        char *p2;
+        p1 = (void *)&p2;
+        *p1 = (void *)0;    /* check that 'func_t' is a pointer type */
+        t1 = cb->get_signed_type(cb, sizeof(int), "int");
+        t2 = cb->get_signed_type(cb, sizeof(long), "long");
+        a3[0] = t2;
+        t4 = cb->get_ellipsis_function_type(cb, t1, a3, 1);
+        t5 = cb->get_pointer_type(cb, t4);
+        cb->define_type(cb, "func_t", t5);
+#expect TYPEDEF func_t = PTR FUNC( long -> ... -> int )
+    }
+}
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to