File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -63,15 +63,15 @@ class Fletcher32(Codec):
6363 def encode (self , buf ):
6464 """ Return buffer plus 4-byte fletcher checksum"""
6565 buf = ensure_contiguous_ndarray(buf).ravel().view(' uint8' )
66- cdef const uint8_t[::1 ] b_ptr = buf
67- val = _fletcher32(b_ptr )
66+ cdef const uint8_t[::1 ] b_mv = buf
67+ val = _fletcher32(b_mv )
6868 return buf.tobytes() + struct .pack(" <I" , val)
6969
7070 def decode (self , buf , out = None ):
7171 """ Check fletcher checksum, and return buffer without it"""
7272 b = ensure_contiguous_ndarray(buf).view(' uint8' )
73- cdef const uint8_t[::1 ] b_ptr = b[:- 4 ]
74- val = _fletcher32(b_ptr )
73+ cdef const uint8_t[::1 ] b_mv = b[:- 4 ]
74+ val = _fletcher32(b_mv )
7575 found = b[- 4 :].view(" <u4" )[0 ]
7676 if val != found:
7777 raise RuntimeError (
You can’t perform that action at this time.
0 commit comments