Closed sogaiu closed 1 month ago
According to the docs:
The void type can only be used as a return value
so, it makes sense that (ffi/struct :void) shouldn't work.
(ffi/struct :void)
Currently though, the running janet process terminates:
janet
$ janet Janet 1.37.0-dev-282f2671 linux/x64/gcc - '(doc)' for help repl:1:> (ffi/struct :void) Floating point exception $ echo $? 136
Is it practical to error without process termination instead?
Yup, that is an issue - root cause is a division by zero when we are calculating size and alignment. Just pushed a fix, I think this reveals a bit of a hole in our FFI testing.
According to the docs:
so, it makes sense that
(ffi/struct :void)
shouldn't work.Currently though, the running
janet
process terminates:Is it practical to error without process termination instead?