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

Edi Weitz <[email protected]> 14 Aug 2003 23:09:52 +0200
Newsgroups gmane.lisp.uffi.general
Message-ID <[email protected]>
On Thu, 14 Aug 2003 14:55:33 -0600, Kevin Rosenberg <kevin-HJRc7zDS/[email protected]> wrote:

> 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.

But that wouldn't help with aggregate types, would it? The reason why
I came across this is that GD defines a "font structure"
<http://www.boutell.com/gd/manual2.0.15.html#gdFontPtr> and has some
predefined font structures like gdFontTiny which I can access from LW
or Python-based Lisps but not (yet) from AllegroCL.

It will be easy to work around this with a glue function and I
actually don't need to access the structure's content (a pointer to it
will suffice) but I still think it would be nice to have something
similar to FLI:DEFINE-FOREIGN-VARIABLE
<http://www.lispworks.com/reference/lwl42/FLI-U/html/fli-61.htm#pgfId-886022>
in UFFI.

Edi.