File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -134,12 +134,11 @@ unsafeIndex (ByteArray arr) i@(I# i#) =
134
134
case indexWord8Array# arr i# of r# -> (W8 # r# )
135
135
{-# INLINE unsafeIndex #-}
136
136
137
- -- | 'sizeofMutableByteArray#' is deprecated, because it is unsafe in the presence of
138
- -- 'shrinkMutableByteArray#' and 'resizeMutableByteArray#'.
139
- --
140
- -- @since 2.0
137
+ -- | @since 2.0
141
138
getSizeofMArray :: MArray s -> ST s Int
142
139
getSizeofMArray (MutableByteArray marr) = ST $ \ s0# ->
140
+ -- Cannot simply use (deprecated) 'sizeofMutableByteArray#', because it is
141
+ -- unsafe in the presence of 'shrinkMutableByteArray#' and 'resizeMutableByteArray#'.
143
142
case getSizeofMutableByteArray# marr s0# of
144
143
(# s1# , word8len# # ) -> (# s1# , I # word8len# # )
145
144
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ between x y z = x >= y && x <= z
68
68
-- | ord c < 0x800 = 2
69
69
-- | ord c < 0x10000 = 3
70
70
-- | otherwise = 4
71
+ -- Implementation suggested by Alex Mason.
71
72
72
73
-- | @since 2.0
73
74
utf8Length :: Char -> Int
You can’t perform that action at this time.
0 commit comments