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
- data StdString
- newStdString :: ByteString -> IO (Ptr StdString)
- maybeNewStdString :: Maybe ByteString -> IO (Ptr StdString)
- hs_new_std_string :: Ptr Word8 -> Int -> IO (Ptr StdString)
- hs_new_std_string_def :: IO (Ptr StdString)
- hs_std_string_size :: Ptr StdString -> IO Int
- hs_std_string_cstr :: Ptr StdString -> IO (Ptr Word8)
- hs_delete_std_string :: Ptr StdString -> IO ()
- unsafePeekStdString :: Ptr StdString -> IO ByteString
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.
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 #
CXX: std::string
newStdString :: ByteString -> IO (Ptr StdString) Source #
New a c++ std::string from proviced bytestring.
The memory should be deallocated using delete when no longer required.
maybeNewStdString :: Maybe ByteString -> IO (Ptr StdString) Source #