1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-25 22:53:16 +00:00

Add windows FFI example test case for void functions with double

argument.
This commit is contained in:
bakpakin 2022-09-15 13:58:54 -05:00
parent e326071c35
commit c7bc711f63
2 changed files with 6 additions and 0 deletions

View File

@ -124,6 +124,10 @@ void void_fn(void) {
printf("void fn ran\n");
}
EXPORTER void_fn_2(double y) {
printf("y = %f\n", y);
}
EXPORTER
void void_ret_fn(int x) {
printf("void fn ran: %d\n", x);

View File

@ -43,6 +43,7 @@
h :double
i :double
j :double])
(ffi/defbind void-fn-2 :void [y :double])
#
# Struct reading and writing
@ -84,6 +85,7 @@
# Call functions
#
(tracev (void-fn-2 10.3))
(tracev (double-many 1 2 3 4 5 6))
(tracev (string/format "%.17g" (double-many 1 2 3 4 5 6)))
(tracev (type (double-many 1 2 3 4 5 6)))