[cffi-devel] %expand-type-to-foreign-dyn vs *runtime-translator-form*

Luís Oliveira luismbo at gmail.com
Mon Mar 13 17:11:13 UTC 2006


On 2006-mar-01, at 19:53, Stephen Compall wrote:
> Wed Mar  1 13:41:22 CST 2006  Stephen Compall <scompall at nocandysw.com>
>   * demonstrate differing behavior between foreign-dyn expansions

 > ;; free-translated-object must not be called when there is an etf,  
but
 > ;; they answer *runtime-translator-form*

I think this isn't a good idea. Here's an example:

(defmethod expand-to-foreign-dyn (value var body (name (eql :string)))
   (if <string's size is appropriate for stack allocation>
       `(with-foreign-string (,var ,value)
          , at body)
       *runtime-translator-form*))

Surely we want free-translated-object to be called in this case.

Or did I miss something?

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/
Equipa Portuguesa do Translation Project
http://www.iro.umontreal.ca/translation/registry.cgi?team=pt




More information about the cffi-devel mailing list