3.3: Foreign functions

#Q 3.3-1) Why do boolean specifications not work as arguments in ff calls?


Q 3.3-1) Why do boolean specifications not work as arguments in ff calls?

A 3.3-1) Transformations are only defined for boolean when specified as a return type, not as an argument. If you specify an argument type as boolean, you'll probably get a warning about incompatibility, and you will certainly not get the operation you were expecting. We hope to add this capability in a future release.

This workaround can be used in the meantime: specify the argument as :int (it can be further specialized as a fixnum) and do the translation explicitly, e.g.

(ff:def-foreign-call foo ((x :lisp) (y :int fixnum))) 
... 
(foo 'bar (if yy 1 0)) 

© Copyright 1998, Franz Inc., Berkeley, CA.  All rights reserved.
$Revision: 1.1.2.5 $