So I've been trying to figure out how to map C enums to SBCL types.
UFFI's approach seems to be to do a define-alien-type <enum-name>
SIGNED and constants for the values. sb-alien, however, has a nice sb-
alien:enum type. Christophe was kind enough to provide an example of
how to do this. Here's a similar example:
this works great and I can do:
(defparameter moose-var (sb-alien:make-alien moose-enum))
and I can do
(setf (sb-alien:deref moose-var) :bear) to set the value to :bear.
Other keywords don't work, which is great. Is there a way to actually
get the value represented by the keyword :bear in the context of the
enum? I know this sort of defeats the purpose of the enum, but it
would still be nice to get.