rpav / cl-autowrap

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

foreign-type type initform cannot be nil #107

Closed metayan closed 4 years ago

metayan commented 4 years ago

Fixes #106

SBCL introduced more rigorous type checking in sbcl-2.0.7-154-g16b55d78d

rpav commented 4 years ago

Wow. Not sure what was going on there.

That said I'm not sure this is the correct solution; perhaps there should just not be a :type restriction. Setting this to t where prior default was nil might be a problem if there are any conditionals looking for a default, but I'm not sure what's in there anymore. It's possible this should be a symbol type (in which case nil is fine), but .. someone's going to have to take a closer look at the code.

Thanks for submitting this though.

metayan commented 4 years ago

Pretty funny, actually. The fix I supplied is just a quickie to have it build now, so a proper solution is welcome. I don't know why the restriction is there, so didn't dare removing it, but it seems now that removing it is the better way.

metayan commented 4 years ago

Removed the type checking from foreign-type type slot in #108 instead.