[fetter-devel] Re: C-FFI backend, Cairo demo

Rayiner Hashem rayiner at gmail.com
Tue Aug 16 00:36:02 UTC 2005


Great. That fixed it. Verrazano uses CFFI-Luis now :)

On 8/15/05, Luis Oliveira <luismbo at gmail.com> wrote:
> On 15/ago/2005, at 23:36, Rayiner Hashem wrote:
> > Still doesn't work :( Same error...
> 
> Ahrg, sorry... I didn't have the original code at hand and I forget
> another thing I broke...
> 
> (defmacro defcenum (name &body values)
>    "Define an foreign enumerated type."
>    `(eval-when (:compile-toplevel :load-toplevel :execute)
>       (notice-foreign-enum ',name :int ',values)
>       (define-type-translation ,name nil
>         :to-c (lambda (arg) `(if (keywordp ,arg)
>                                  (foreign-enum-value ',',name ,arg)
>                                  ,arg))
>         :from-c (lambda (arg) `(foreign-enum-keyword ',',name ,arg)))))
> 
> This time I tested it, seems to work.
> 
> --
> Luís Oliveira
> http://student.dei.uc.pt/~lmoliv/
> Equipa Portuguesa do Translation Project
> http://www2.iro.umontreal.ca/~pinard/po/registry.cgi?team=pt
> 
>



More information about the fetter-devel mailing list