cl-autowrap icon indicating copy to clipboard operation
cl-autowrap copied to clipboard

`basic-foreign-type` method fails when `foreign-record-fields` is empty

Open igorcalabria opened this issue 4 months ago • 0 comments

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

igorcalabria avatar Oct 17 '24 10:10 igorcalabria