From 45460f505c1e16fcdcc3e52a560446498636bdcc Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 27 Jul 2015 21:12:13 +0200 Subject: [PATCH] * Fix data type on read32 in BitArray --- spacy/serialize/bits.pxd | 2 +- spacy/serialize/bits.pyx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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