cl-autowrap
cl-autowrap copied to clipboard
`basic-foreign-type` method fails when `foreign-record-fields` is empty
To reproduce just try to wrap lz4 https://github.com/lz4/lz4/blob/dev/lib/lz4.h
(autowrap:c-include "/usr/include/lz4.h")
I think it might be related to this incomplete typedef here https://github.com/lz4/lz4/blob/dev/lib/lz4.h#L314
Not sure if it's the right fix, but adding a check on https://github.com/rpav/cl-autowrap/blob/master/autowrap/sffi.lisp#L186
(if (and (foreign-scalar-p type) (foreign-record-fields type))
worked