Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- mallocFromByteString :: ByteString -> IO (CString, Int)
- mallocFromMaybeByteString :: Maybe ByteString -> IO (CString, Int)
- newStablePtrByteString :: ByteString -> IO (CString, Int, StablePtr ByteString)
- withByteString :: ByteString -> (Ptr Word8 -> Int -> IO a) -> IO a
- withMaybeByteString :: Maybe ByteString -> (Ptr Word8 -> Int -> IO a) -> IO a
- withByteStringList :: [ByteString] -> (Ptr (Ptr Word8) -> Ptr Int -> Int -> IO a) -> IO a
- withByteStrings :: [ByteString] -> (Ptr (Ptr Word8) -> Ptr Int -> Ptr Int -> Int -> IO a) -> IO a
- withShortByteString :: ShortByteString -> (ByteArray# -> Int -> IO a) -> IO a
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.
mallocFromMaybeByteString :: Maybe ByteString -> IO (CString, Int) Source #
newStablePtrByteString :: ByteString -> IO (CString, Int, StablePtr ByteString) Source #
withByteString :: ByteString -> (Ptr Word8 -> Int -> IO a) -> IO a Source #
withMaybeByteString :: Maybe ByteString -> (Ptr Word8 -> Int -> IO a) -> IO a Source #
Pass list of ByteStrings to FFI.
:: [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.
withShortByteString :: ShortByteString -> (ByteArray# -> Int -> IO a) -> IO a Source #