[Openmcl-devel] slet/rlet with C functions?

Gary Byers gb at clozure.com
Sat Aug 19 04:23:26 UTC 2006

On Fri, 18 Aug 2006, Phil wrote:
>> Unless that sort of annotation happened, I'm not sure that SLET could
>> reasonably recognize/provide sugar for structure-returning ff-calls.
> Would an alternative be to provide an alternate call path (i.e.
> rather than using the reader macro) using a function/macro like
> (EXTERNAL-FUNCTION-CALL "CGRectIntegral" R)?   Other than the
> additional effort to produce, do you see any problems with the idea?

Maybe something like




or something even wierder.

It'd be nicer if #_ just did the right thing, but I'm not sure how we
get there easily.  The coercion from "returns structure" to "takes
a pointer to a structure as a first argument" happens before delarations
get encoded in the .cdb file

The next time that there's a strong(er) reason to change the format of
the .cdb files, it'd be worth trying to arrange that the coercion
happens later; if we know (after reading a function declaration from
the database) that something returns a structure, we can have #_
macroexpand into something special (or otherwise leave information
about that where SLET could find it.)

More information about the Openmcl-devel mailing list