advancePtr for ForeignPtr

Henning Thielemann <[email protected]> Thu, 19 Feb 2009 21:40:08 +0100 (CET)
Newsgroups gmane.comp.lang.haskell.ffi
Message-ID <alpine.DEB.2.00.0902192138590.13354@anubis.informatik.uni-halle.de>
I want to have an advancePtr on ForeignPtr in order create a subarray.
Is this reasonable and possible?
Do I have to use 'touchForeignPtr' as finalizer of the subarray's ForeignPtr
in order to assert that the superarray lives at least as long as the subarray?
Anyway I'd prefer a function in the standard modules
than doing such things by myself.