[cffi-devel] introspection in cffi

Luís Oliveira luismbo at gmail.com
Thu Apr 14 17:15:50 UTC 2011


On Thu, Apr 14, 2011 at 3:47 PM, nitralime <nitralime at googlemail.com> wrote:
> Is there a way to get the (meta) information
> of structure slots defined by defcstruct?

There isn't an exported interface, but you can get the slot info
object with (cffi::get-slot-info 'struct-name 'slot-name) then peek
its slots. See src/types.lisp and have a look at class
FOREIGN-STRUCT-SLOT, its subclasses, and its accessors.

HTH,

-- 
Luís Oliveira
http://r42.eu/~luis/




More information about the cffi-devel mailing list