File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -201,15 +201,17 @@ storableSetAsPrim n fp x _y = withForeignPtr fp $ \ ptr -> do
201
201
poke ptr x
202
202
-- we dont equate storable and prim reps, so we need to write to a slot
203
203
-- in storable
204
- -- then read it back as a prim
204
+ -- then read it back as a prim type
205
+ -- then use prim memset
205
206
w<- peakPrimPtr_vector ((castPtr ptr) :: Ptr b ) 0
206
207
memsetPrimPtr_vector ((castPtr ptr) `plusPtr` sizeOf x ) (n- 1 ) w
207
208
208
209
209
210
210
211
{-
211
212
AFTER primitive 0.7 is pretty old, move to using setPtr. which is really
212
- a confusing misnomer for whats often called memset (intialize )
213
+ a confusing misnomer for whats often called memset (initialize an array with a
214
+ default value)
213
215
-}
214
216
-- Fill a memory block with the given value. The length is in
215
217
-- elements of type @a@ rather than in bytes.
Original file line number Diff line number Diff line change 1
1
Changes in version 0.12.0.2
2
2
* Fixes issue #220, compact heap operations crashing on boxed vectors constructed
3
3
using traverse.
4
+ * remove usage of Data.Primitive.Address and clarify the memset Prim Storable
5
+ smuggling trick in Vector.Storable.Mutable
4
6
5
7
Changes in version 0.12.0.1
6
8
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ Library
145
145
vector.h
146
146
147
147
Build-Depends : base >= 4.5 && < 4.13
148
- , primitive >= 0.5.0.1 && < 0.7
148
+ , primitive >= 0.5.0.1 && < 0.8
149
149
, ghc-prim >= 0.2 && < 0.6
150
150
, deepseq >= 1.1 && < 1.5
151
151
if !impl(ghc > 8.0 )
You can’t perform that action at this time.
0 commit comments