2007/7/27, Bayley, Alistair <[EMAIL PROTECTED]>:
> It was my intention to do it the other way around: marshall blob to Ptr
> (), and then you can cast this to a Ptr CChar. Obviously you'd need to
> retain the size information, so a blob basically becomes a (Ptr (), Int)
> pair, just like a CStringLen...
>
> At least this way you've got a type which says explicitly "this thing is
> a blob", and then if you know better, i.e. it's really a CString, you
> can cast it.

You're right, I'll work in this direction. Eventually I will add also
the CStringLen marshalling, as it is a pretty common case (BS, FPS,
PS) and it could be handy.

Salvatore
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to