foreign-0.2.1.0: A collection of helpers for ffi.
Safe HaskellNone
LanguageHaskell2010

HsForeign.String

Synopsis

Documentation

mallocFromByteString :: ByteString -> IO (CString, Int) Source #

Copies the content of the given ByteString.

The memory may be deallocated using free or finalizerFree when no longer required.

withByteStringList Source #

Arguments

:: [ByteString] 
-> (Ptr (Ptr Word8) -> Ptr Int -> Int -> IO a)

cstring*, len*, list_len

-> IO a 

Pass list of ByteStrings to FFI.

withByteStrings Source #

Arguments

:: [ByteString] 
-> (Ptr (Ptr Word8) -> Ptr Int -> Ptr Int -> Int -> IO a)

cstring*, offset*, len*, list_len

-> IO a 

Deprecated: use withByteStringList instead

Pass list of ByteStrings to FFI.