Hi,
I am calling a Haskell function from my C code, wherein I export a
Haskell function xyz that takes as an argument string and returns a
string:

Foreign export ccall xyz::CString -> IO CString 

xyz = do
         -- extract the input string and act on it--
       -- at the end I return a string like this
      newCString str

Now once I call this function from C code, I am freeing the allocated
memory using free function. I want to confirm that this is the right
thing to do.

- Anurag
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to