Re: Idea/proposal/question DEF-FOREIGN-VAR

Kevin Rosenberg <kevin-HJRc7zDS/[email protected]> Thu, 14 Aug 2003 14:55:33 -0600
Newsgroups gmane.lisp.uffi.general
Message-ID <[email protected]>
--UugvWAfsgieZRqgk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Kevin Rosenberg wrote:
> http://www.franz.com/support/documentation/6.2/doc/pages/operators/ff/def-foreign-variable.htm
> You should be able to use the :type keyword for non-integer types, but
> I haven't tested this function.


http://www.franz.com/support/documentation/6.2/doc/pages/operators/system/memref.htm

Whoops. ff:define-foreign-variable will require a new translation from
UFFI types since it calls system:memref. For example, the UFFI type
:double will need to translate to :double-float rather than normal
AllegroCL foreign type double. Thus, I think CONVERT-FROM-UFFI-TYPE
will need a new context, perhaps named :FOREIGN-VAR.

Also, you should probably put the type conversion in the macro
expansion so that it can be evaluated at run time. Then, someone could
have the flexibility of:

(defvar *default-foreign-var-type* :int)

(uffi:def-foreign-var fvar *default-foreign-var-type*)

Kevin


--UugvWAfsgieZRqgk
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/O/dFES7N8sSjgj4RAmTMAJ0W/TcI9hHIH3nCtsUCXoBdwublFwCgg0NE
6gYzeEYnlNL5oL/S4tdfYFY=
=SbPj
-----END PGP SIGNATURE-----

--UugvWAfsgieZRqgk--