1
0
mirror of https://github.com/janet-lang/janet synced 2025-09-11 07:16:11 +00:00

Don't error on empty struct.

This commit is contained in:
Calvin Rose
2024-10-18 17:53:21 -05:00
parent 046d28662d
commit 07155ce657
2 changed files with 7 additions and 1 deletions

View File

@@ -52,5 +52,10 @@
(assert (= 26 (ffi/size [:char :pack :int @[:char 21]]))
"array struct size"))
(end-suite)
(compwhen has-ffi
(assert-no-error "bad struct issue #1512" (ffi/struct :void))
(def s (ffi/struct :void))
(assert (= 0 (ffi/size s)))
(assert (= 1 (ffi/align s))))
(end-suite)