Skip to content

Commit e46d36e

Browse files
committed
Merge zarr-developers/main into jakirkham/def_const_header_vlen
2 parents a2c3ee9 + 96086c3 commit e46d36e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/release.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ Improvements
2929
Fixes
3030
~~~~~
3131

32+
* Fix ``const`` discard warnings in ``fletcher32``.
33+
By :user:`John Kirkham <jakirkham>`, :issue:`728`
34+
3235
Maintenance
3336
~~~~~~~~~~~
3437

numcodecs/fletcher32.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class Fletcher32(Codec):
7676
"""Return buffer plus a footer with the fletcher checksum (4-bytes)"""
7777
buf = ensure_contiguous_ndarray(buf).ravel().view('uint8')
7878
cdef const uint8_t[::1] b_mv = buf
79-
cdef uint8_t* b_ptr = &b_mv[0]
79+
cdef const uint8_t* b_ptr = &b_mv[0]
8080
cdef Py_ssize_t b_len = len(b_mv)
8181

8282
cdef Py_ssize_t out_len = b_len + FOOTER_LENGTH
@@ -92,7 +92,7 @@ class Fletcher32(Codec):
9292
"""Check fletcher checksum, and return buffer without it"""
9393
b = ensure_contiguous_ndarray(buf).view('uint8')
9494
cdef const uint8_t[::1] b_mv = b
95-
cdef uint8_t* b_ptr = &b_mv[0]
95+
cdef const uint8_t* b_ptr = &b_mv[0]
9696
cdef Py_ssize_t b_len = len(b_mv)
9797

9898
val = _fletcher32(b_mv[:-FOOTER_LENGTH])

0 commit comments

Comments
 (0)