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

HsForeign.String

Synopsis

CString

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.

withByteStrings Source #

Arguments

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

cstring*, offset*, len*, list_len

-> IO a 

Pass list of ByteStrings to FFI.

CXX: std::string