diff options
-rw-r--r-- | stdlib/ffi.tl | 3 | ||||
-rw-r--r-- | tests/017/variadic.expected | 1 | ||||
-rw-r--r-- | tests/017/variadic.tl | 6 |
3 files changed, 9 insertions, 1 deletions
diff --git a/stdlib/ffi.tl b/stdlib/ffi.tl index e6d8d049..bf1c6111 100644 --- a/stdlib/ffi.tl +++ b/stdlib/ffi.tl @@ -64,7 +64,8 @@ ((float) 'double) ((be-float le-float) (compile-error form "variadic argument cannot be of type ~s" - vt)))))) + vt)) + (t vt))))) (list* (+ (len ftypes) (len vtypes)) (len ftypes) (append ftypes vtypes)))) 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) |