* Fix data type on read32 in BitArray

This commit is contained in:
Matthew Honnibal 2015-07-27 21:12:13 +02:00
parent 3d43f49f69
commit 45460f505c
2 changed files with 2 additions and 2 deletions

View File

@ -20,4 +20,4 @@ cdef class BitArray:
cdef int extend(self, uint64_t code, char n_bits) except -1 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

View File

@ -65,7 +65,7 @@ cdef class BitArray:
self.i += 1 self.i += 1
yield 1 if self.byte & (one << i) else 0 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 cdef int start_byte = self.i // 8
# TODO portability # TODO portability