summaryrefslogtreecommitdiffstats
path: root/tests/017
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-08-17 06:48:01 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-08-17 06:48:01 -0700
commitf396b4880f4a674ce6043de6ef3dc7f7d9d29a24 (patch)
tree99f357d00f51f204e3938db30d55364d3f3cf90b /tests/017
parentbd63a83d32173ff7912c159f6f0cced2e7399a98 (diff)
downloadtxr-f396b4880f4a674ce6043de6ef3dc7f7d9d29a24.tar.gz
txr-f396b4880f4a674ce6043de6ef3dc7f7d9d29a24.tar.bz2
txr-f396b4880f4a674ce6043de6ef3dc7f7d9d29a24.zip
ffi: fix broken deffi support for variadic functions.
* stdlib/ffi.c (sys:analyze-argtypes): Add missing fallback case in filtering loop. This wouldn't have happened if we had a ecaseql macro, and used it. Or if we had coverage of this in tests. * tests/017/variadic.tl, tests/017/variadic.expected: New files.
Diffstat (limited to 'tests/017')
-rw-r--r--tests/017/variadic.expected1
-rw-r--r--tests/017/variadic.tl6
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/017/variadic.expected b/tests/017/variadic.expected
new file mode 100644
index 00000000..8a918349
--- /dev/null
+++ b/tests/017/variadic.expected
@@ -0,0 +1 @@
+foo-123 = 4.560
diff --git a/tests/017/variadic.tl b/tests/017/variadic.tl
new file mode 100644
index 00000000..6fa464e0
--- /dev/null
+++ b/tests/017/variadic.tl
@@ -0,0 +1,6 @@
+(load "../common")
+
+(with-dyn-lib (libc)
+ (deffi printf-int-double "printf" int (str : int double)))
+
+(printf-int-double "foo-%d = %4.3f\n" 123 4.56)