[cffi-devel] Re: Type translators

Luis Oliveira luismbo at gmail.com
Thu Aug 4 05:51:40 UTC 2005


On 4/ago/2005, at 04:57, James Bielman wrote:
> I must admit I'm not wild about using &symbols as placeholders inside
> these expansions, as I think that's a naming convention best left
> unique to lambda list keywords.

What about $symbols? Looks like Perl, heh.

(define-type-translation string
   "String translator."
   :c-type :pointer
   :to-c-arg
   (let (($var (foreign-string-alloc $value)))
     (unwind-protect
          ($body)
       (foreign-string-free $var)))
   :to-c
   (foreign-string-alloc $value)
   :from-c
   (foreign-string-to-lisp $value))

-- 
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 cffi-devel mailing list