hmm. this approach to FFI export's types isn't working :-(.
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? Perhaps the marshalling should be saved for the very end, and done in C.FromGrin2 or thereabouts?
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 -- John Meacham - ⑆repetae.net⑆john⑈
participants (2)
-
John Meacham -
Samuel Bronson