[Haskell-cafe] Re: StableFunPtr?

Neal Alexander relapse.dev at gmx.com
Tue Feb 17 06:10:32 EST 2009


Maurí­cio wrote:
> Hi,
> 
> I've seen that if I'm going to leave a pointer
> to data in the hands of foreign code, I should
> use StablePtr so that the value it points to
> doesn't change.
> 
> However, we also usually give FunPtr to foreign
> code, like when registering callbacks, but I
> can't found any kind of "StableFunPtr".
> 
> Are all FunPtrs stable?
> 
> Thanks,
> Maurício

You can also use StablePtr for callbacks (forkOS uses it).

I'm not sure what the difference is between the two in that case though.



More information about the Haskell-Cafe mailing list