From 1a8ff4e1842c5950c37fcaaf89d3431321332497 Mon Sep 17 00:00:00 2001 From: Francesc Alted Date: Tue, 22 Aug 2023 12:29:12 +0200 Subject: [PATCH] Fix a stupid memoryview bug introduced a few days ago --- blosc2/blosc2_ext.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blosc2/blosc2_ext.pyx b/blosc2/blosc2_ext.pyx index 893b1b7c..fb3fcae8 100644 --- a/blosc2/blosc2_ext.pyx +++ b/blosc2/blosc2_ext.pyx @@ -1163,7 +1163,7 @@ cdef class SChunk: return rc def insert_chunk(self, nchunk, chunk): - cdef uint8_t[:] typed_view_chunk + cdef const uint8_t[:] typed_view_chunk mem_view_chunk = memoryview(chunk) typed_view_chunk = mem_view_chunk.cast('B') _check_comp_length('chunk', len(typed_view_chunk)) @@ -1203,7 +1203,7 @@ cdef class SChunk: return rc def update_chunk(self, nchunk, chunk): - cdef uint8_t[:] typed_view_chunk + cdef const uint8_t[:] typed_view_chunk mem_view_chunk = memoryview(chunk) typed_view_chunk = mem_view_chunk.cast('B') _check_comp_length('chunk', len(typed_view_chunk))