diff --git a/spacy/serialize/bits.pxd b/spacy/serialize/bits.pxd index 9c7593a92..d0b0a7fdd 100644 --- a/spacy/serialize/bits.pxd +++ b/spacy/serialize/bits.pxd @@ -20,4 +20,4 @@ cdef class BitArray: cdef int extend(self, uint64_t code, char n_bits) except -1 - cdef uint32_t read32(self) except 0 + cdef int32_t read32(self) except 0 diff --git a/spacy/serialize/bits.pyx b/spacy/serialize/bits.pyx index 2f0fb30f6..71a198a46 100644 --- a/spacy/serialize/bits.pyx +++ b/spacy/serialize/bits.pyx @@ -65,7 +65,7 @@ cdef class BitArray: self.i += 1 yield 1 if self.byte & (one << i) else 0 - cdef uint32_t read32(self) except 0: + cpdef int32_t read32(self) except 0: cdef int start_byte = self.i // 8 # TODO portability