How does one use pass by reference functions using the ffi?

David Sankel <[email protected]> Sat, 24 Jan 2004 19:30:20 -0800 (PST)
Newsgroups gmane.comp.lang.haskell.ffi
Message-ID <[email protected]>
Hello FFI experts,

  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: 

doStuff :: Int -> Int -> IO( (Int,Int) )

  There weren't any relevant results when searching `"pass by reference"
haskell ffi` in google.

Thanks in advance,

David J. Sankel