On Mon, 23 Feb 2009, Felipe Lessa wrote:

On Mon, Feb 23, 2009 at 10:12 AM, Henning Thielemann
<lemm...@henning-thielemann.de> wrote:
Is still someone on haskell.org ?

Sorry, I don't know :).

I meant f...@haskell.org

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?

This may work, but seems like a fragile hack. Why not


 data SubArray a = SA {-# UNPACK #-} !(ForeignPtr a)
                      {-# UNPACK #-} !Int

This would work, but I want to convert from StorableVector to CArray and StorableVector has an offset parameter, which is missing in CArray.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to