From 2f52feb87607cb28b8ee92d284b46092b52263b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CB=8Cbod=CA=B2=C9=AA=CB=88=C9=A1r=CA=B2im?= Date: Fri, 15 Sep 2023 23:57:31 +0100 Subject: [PATCH] Update Data/ByteString.hs Co-authored-by: Matthew Craven --- Data/ByteString.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Data/ByteString.hs b/Data/ByteString.hs index e844e4d05..1e39ae67f 100644 --- a/Data/ByteString.hs +++ b/Data/ByteString.hs @@ -1801,7 +1801,7 @@ useAsCString (BS fp l) action = -- As for 'useAsCString' this function makes a copy of the original @ByteString@. -- It must not be stored or used after the subcomputation finishes. -- --- Beware that this function does not add a terminating @\NUL@ byte at the end of 'CStringLen'. +-- Beware that this function is not required to add a terminating @\NUL@ byte at the end of the 'CStringLen' it provides. -- If you need to construct a pointer to a null-terminated sequence, use 'useAsCString' -- (and measure length independently if desired). useAsCStringLen :: ByteString -> (CStringLen -> IO a) -> IO a