diff --git a/README.md b/README.md index 64095badc000a302ca2f370d8fa02224406b392f..d8ea636a6c544aa7c6dc98bb914b028e78babf5a 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Consult the docs for how to disable it. ## v0.6.5 -* _TBA_ +* fixed warnings about signed to unsigned comparison ## v0.6.4 diff --git a/setup.cfg b/setup.cfg index 9824331a8e3dbd1323394a3e4fcc73359a1ec65f..31783691fbe8e95f0d39c860f16a46112c645755 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ # coding: utf-8 [metadata] name = tempsdb -version = 0.6.5a1 +version = 0.6.5a2 long-description = file: README.md long-description-content-type = text/markdown; charset=UTF-8 license_files = LICENSE diff --git a/tempsdb/chunks/base.pxd b/tempsdb/chunks/base.pxd index c128df5e575e0f0e7cc746f5af1f81cb12bc622e..bd446f5b2927f870719007c71ba840c8683b2b6c 100644 --- a/tempsdb/chunks/base.pxd +++ b/tempsdb/chunks/base.pxd @@ -26,9 +26,9 @@ cdef class Chunk: cdef int sync(self) except -1 cpdef unsigned long long get_timestamp_at(self, unsigned int index) cpdef bytes get_value_at(self, unsigned int index) - cpdef bytes get_slice_of_piece_at(self, unsigned int index, int start, int stop) - cpdef bytes get_slice_of_piece_starting_at(self, unsigned int index, int start) - cpdef int get_byte_of_piece(self, unsigned int index, int byte_index) except -1 + cpdef bytes get_slice_of_piece_at(self, unsigned int index, unsigned int start, unsigned int stop) + cpdef bytes get_slice_of_piece_starting_at(self, unsigned int index, unsigned int start) + cpdef int get_byte_of_piece(self, unsigned int index, unsigned int byte_index) except -1 cpdef unsigned int find_left(self, unsigned long long timestamp) cpdef unsigned int find_right(self, unsigned long long timestamp) cdef object open_file(self, str path) @@ -49,7 +49,7 @@ cdef class Chunk: """ return self.min_ts - cdef inline int length(self): + cdef inline unsigned int length(self): """ :return: amount of entries in this chunk :rtype: int diff --git a/tempsdb/chunks/base.pyx b/tempsdb/chunks/base.pyx index b86c553599820c4b5fc7397c4e834ee897371330..0fa4df86a80ed4c0c16083814c1fafc369bf1d0d 100644 --- a/tempsdb/chunks/base.pyx +++ b/tempsdb/chunks/base.pyx @@ -214,7 +214,7 @@ cdef class Chunk: self.after_init() - cpdef int get_byte_of_piece(self, unsigned int index, int byte_index) except -1: + cpdef int get_byte_of_piece(self, unsigned int index, unsigned int byte_index) except -1: """ Return a particular byte of given element at given index. @@ -230,7 +230,7 @@ cdef class Chunk: cdef unsigned long ofs = HEADER_SIZE + TIMESTAMP_SIZE + index * (self.block_size + TIMESTAMP_SIZE) + byte_index return ord(self.mmap[ofs]) - cpdef bytes get_slice_of_piece_starting_at(self, unsigned int index, int start): + cpdef bytes get_slice_of_piece_starting_at(self, unsigned int index, unsigned int start): """ Return a slice of data from given element starting at given index to the end @@ -240,7 +240,7 @@ cdef class Chunk: """ return self.get_slice_of_piece_at(index, start, self.block_size) - cpdef bytes get_slice_of_piece_at(self, unsigned int index, int start, int stop): + cpdef bytes get_slice_of_piece_at(self, unsigned int index, unsigned int start, unsigned int stop): """ Return a slice of data from given element