File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ pom.xml.asc
10
10
.DS_Store
11
11
/doc
12
12
push
13
+ * .iml
14
+ .idea /
13
15
.clj-kondo /.cache
14
16
.lsp /.cache
15
17
.portal /vs-code.edn
Original file line number Diff line number Diff line change 174
174
(with-buffer [buf slab]
175
175
(reset! status s)
176
176
(.put buf (p/+ offset 1 )
177
- (case s
178
- :incomplete 0
179
- :in-progress 1
180
- :complete 2 ))
177
+ (byte
178
+ (case s
179
+ :incomplete 0
180
+ :in-progress 1
181
+ :complete 2 )))
181
182
(invalidate slab (p/+ offset 1 ) 1 )
182
183
nil )))
183
184
190
191
(fn []
191
192
(with-buffer [buf slab]
192
193
(let [^ByteBuffer buf (-> buf
193
- (.position offset)
194
+ (.position ^Long offset)
194
195
^ByteBuffer
195
- (.limit (+ offset len))
196
+ (.limit ^Long (+ offset len))
196
197
.slice)
197
198
checksum' (.getLong buf 2 )
198
199
ary (bs/to-byte-array (.position buf header-size))]
303
304
(let [ary (nippy/freeze descriptor)
304
305
cnt (count ary)
305
306
pos @position
306
- ^ByteBuffer buf (.position buf pos)]
307
+ ^ByteBuffer buf (.position buf ^Long pos)]
307
308
308
309
(when (> (.remaining buf) (+ (count ary) header-size))
309
310
; ; write to the buffer
310
311
(doto buf
311
- (.position pos)
312
+ (.position ^Long pos)
312
313
(.put (byte 1 )) ; ; exists
313
314
(.put (byte 0 )) ; ; incomplete
314
315
(.putLong (checksum cnt ary))
315
316
(.putInt cnt)
316
- (.put ary)
317
+ (.put ^bytes ary)
317
318
(.put (byte 0 ))) ; ; next doesn't exist
318
319
319
320
(swap! position + header-size cnt)
You can’t perform that action at this time.
0 commit comments