rpav / cl-autowrap

(c-include "file.h") => complete FFI wrapper
BSD 2-Clause "Simplified" License
210 stars 41 forks source link

Empty enum handling #128

Open KislyjKisel opened 6 months ago

KislyjKisel commented 6 months ago

Empty enums by themselves cause errors in C compiler. But for enum used in a typedef before its definition (typedef enum SomeFlags SomeFlags;) c2ffi produces enum declaration with "fields": []. cl-autowrap then fails with "invalid index 0..." in find-prefix (elt sorted-fields 0), which is used in parse-enum-fields I think.