Closed mwette closed 6 years ago
You mean like (bytestructure-descriptor->ffi-descriptor bs)
where bs
contains the symbol void
?
It feels wrong to me, since the symbol void
is not a valid bytestructure-descriptor in general; only accepted as a special-case by bs:pointer
. Maybe another special-case can be added though; how big is the convenience that this would bring?
It's the same as needing to deal with adding two objects which could be numbers or undefined.
Either + handles it (ref: the maybe monad) or you have to always check in your code if both items
you are adding are undefined or not. You are saying having to make + deal with undefined it not
clean. That is true. But all the code now has to deal with the special case of undefined (= void).
You can keep it and I can write a "maybe" wrapper around the converter or check all the time.
If you don't feel comfortable with it I can handle it.
That sounds annoying. I went forth and made it handle 'void. Thanks for the hint. :-)
maybe bytestructure-descriptor->ffi-descriptor should work for 'void argument