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

Liam Healy lnp at healy.washington.dc.us
Fri Sep 9 14:47:03 UTC 2011


On Fri, Sep 9, 2011 at 10:40 AM, Luís Oliveira <luismbo at gmail.com> wrote:
> 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.

If you could that would be great, I think you could do that much
quicker than I could.  If you make your new class in the fsbv branch,
I will pull from there and continue the development of structure
definition and conversion in src/structures.lisp.

Thanks,
Liam




More information about the cffi-devel mailing list