>   Say I have a function somewhere in c land with the following declaration:
>
> void doStuff( int &a, int &b);
>
>   What would the appropriate Haskell wrapper for this function look like?
> I'm looking to construct a haskell function of the type:

The following (untested) Greencard code ought to do the trick.

%fun doStuff :: Int -> Int -> IO (Int,Int)
%code doStuff(&arg1,&arg2)
%return ({*arg1},{*arg2})

--
Alastair Reid

_______________________________________________
FFI mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/ffi

Reply via email to