File tree 1 file changed +6
-2
lines changed
System/OsPath/Data/ByteString/Short
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -164,10 +164,14 @@ useAsCString bs action =
164
164
action buf
165
165
where l = length bs
166
166
167
- -- | /O(n) construction./ Use a @ShortByteString@ with a function requiring a @ CStringLen@ .
168
- -- As for @ useAsCString@ this function makes a copy of the original @ShortByteString@.
167
+ -- | /O(n) construction./ Use a @ShortByteString@ with a function requiring a ' CStringLen' .
168
+ -- As for ' useAsCString' this function makes a copy of the original @ShortByteString@.
169
169
-- It must not be stored or used after the subcomputation finishes.
170
170
--
171
+ -- Beware that this function does not add a terminating @\NUL@ byte at the end of 'CStringLen'.
172
+ -- If you need to construct a pointer to a null-terminated sequence, use 'useAsCString'
173
+ -- (and measure length independently if desired).
174
+ --
171
175
-- @since 0.10.10.0
172
176
useAsCStringLen :: ShortByteString -> (CStringLen -> IO a ) -> IO a
173
177
useAsCStringLen bs action =
You can’t perform that action at this time.
0 commit comments