[cffi-devel] Converting foreign structures with CFFI generic functions

Luís Oliveira luismbo at gmail.com
Fri Sep 9 14:40:26 UTC 2011


On Fri, Sep 9, 2011 at 3:30 PM, Liam Healy <lnp at healy.washington.dc.us> wrote:
> I'm having trouble with this.  If I simply make it a superclass, I get
> an error: Must specify an ACTUAL-TYPE.  If I fill the slot when I try
> to define the class, I get an error that complex is not a CFFI type.
> I'm not knowledgeable about the various classes and what an alias type
> means, etc.  Can you fill me in on exactly how the new type class
> should be made when it is a subclass of both foreign-struct-type and
> enhanced-foreign-type?

Oh, ENHANCED-FOREIGN-TYPE assumes that the type will boil down to one
of the primitive types. (:int, :long, etc.) I guess we have to yank
that out into a new subclass. I'd be happy to some hacking along those
lines later tonight or tomorrow if that gives you too much trouble.

Cheers,

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




More information about the cffi-devel mailing list