on master help sign in
Rename unsafeAsCString to asCStringUnsafe
df6750bAdithya Kumar
src/Streamly/Internal/Data/Array/Foreign.hs+3−3
@@ -93,7 +93,7 @@ module Streamly.Internal.Data.Array.Foreign
93 , asBytes
93 , asBytes
94 , castUnsafe
94 , castUnsafe
95 , asPtrUnsafe
95 , asPtrUnsafe
96− , unsafeAsCString -- asCStringUnsafe?
96+ , asCStringUnsafe
97 , A.unsafeFreeze -- asImmutableUnsafe?
97 , A.unsafeFreeze -- asImmutableUnsafe?
98 , A.unsafeThaw -- asMutableUnsafe?
98 , A.unsafeThaw -- asMutableUnsafe?
99
99
@@ -562,8 +562,8 @@ cast arr =
562--
562--
563-- /Pre-release/
563-- /Pre-release/
564--
564--
565−unsafeAsCString :: Array a -> (CString -> IO b) -> IO b
565+asCStringUnsafe :: Array a -> (CString -> IO b) -> IO b
566−unsafeAsCString arr act = do
566+asCStringUnsafe arr act = do
567 let arr1 = asBytes arr <> A.fromList [0]
567 let arr1 = asBytes arr <> A.fromList [0]
568 asPtrUnsafe arr1 $ \ptr -> act (castPtr ptr)
568 asPtrUnsafe arr1 $ \ptr -> act (castPtr ptr)
569
569
src/Streamly/Internal/FileSystem/Event/Linux.hs+1−1
@@ -727,7 +727,7 @@ addToWatch cfg@Config{..} watch0@(Watch handle wdMap) root0 path0 = do
727 --
727 --
728 -- XXX The file may have even got deleted and then recreated which we will
728 -- XXX The file may have even got deleted and then recreated which we will
729 -- never get to know, document this.
729 -- never get to know, document this.
730− wd <- A.unsafeAsCString absPath $ \pathPtr ->
730+ wd <- A.asCStringUnsafe absPath $ \pathPtr ->
731 throwErrnoIfMinus1 ("addToWatch: " ++ utf8ToString absPath) $
731 throwErrnoIfMinus1 ("addToWatch: " ++ utf8ToString absPath) $
732 c_inotify_add_watch (fdFD fd) pathPtr (CUInt createFlags)
732 c_inotify_add_watch (fdFD fd) pathPtr (CUInt createFlags)
733
733