[jhc] hmm. this approach to FFI export's types isn't working :-(.
john at repetae.net
Mon Jul 9 21:14:57 EDT 2007
On Mon, Jul 09, 2007 at 05:00:33PM -0400, Samuel Bronson wrote:
> It seems that the types that would be appropriate for the arguments of
> an FFI-exported function are not really allowed to exist in E or Grin
> :-(. What should I do about this?
Yes, this is done specifically on purpose now (see my other post). the
foreign calling convention is fully and only specified by the 'ExtType'
fields in the C Primitive. these need not (and likely won't) coorespond
to E or Core types.
the proper ExtType is determined by the name used in the foreign export,
_not_ its type, so you can't just expand all newtypes away then look at
the result, you peel off newtypes in layers until you get a valid
translation to a C calling convention and store that in the C.Prim field
and then forget about it until C/FromFoo
John Meacham - ⑆repetae.net⑆john⑈
More information about the jhc