[Haskell-cafe] handles and foreign C functions

Andrea Rossato mailing_list at istitutocolli.org
Wed Dec 3 11:23:20 EST 2008


On Wed, Dec 03, 2008 at 07:08:00PM +0300, Bulat Ziganshin wrote:
> Hello Andrea,
> 
> Wednesday, December 3, 2008, 5:09:21 PM, you wrote:
> 
> > How can I pass to printStuff a stdout FILE pointer?
> 
> afair, "&stdout" syntax used to import variables. it was discussed
> just a day or two ago :)


you mean this, I think:

foreign import ccall unsafe "&stdout" c_stdout :: Ptr CFile

(my fault with the cut&paste of the previous message).

This is causing the segmentation fault I was talking about.

Thanks,
Andrea


More information about the Haskell-Cafe mailing list