On Tue, 2006-02-28 at 23:58 -0600, Stephen Compall wrote:
If a translation method is available [for some defn thereof], as found by compute-applicable-methods, but that method answered *runtime-translator-form*, the final result of the expander would be something like
`(multiple-value-bind (,var ,param) (translate-type-to-foreign ,value ,type) (unwind-protect (progn ,@body) (free-type-translated-object ,var ,type ,param)))
Otherwise, both implementations of expand-type-to-foreign-dyn would short-circuit the generic function call and return
`(let ((,var ,(expand-type-to-foreign value type))) ,@body)
I fixed the macroexpansion at http://paste.lisp.org/display/17379 and added a couple tests demonstrating this behavior to misc-types.lisp in http://scompall.nocandysw.com/cffi/foreign-dyn-behavior-tests.darcs.patch
Wed Mar 1 13:41:22 CST 2006 Stephen Compall scompall@nocandysw.com * demonstrate differing behavior between foreign-dyn expansions
- change expand-type-to-foreign-dyn for foreign-typedef to not short-circuit expand-type-to-foreign when falling back (see paste 17379) - add tests showing that you can change the foreign-dyn expansion semantics by providing an expand-to-foreign method that falls back