Skip to content
This repository was archived by the owner on Dec 10, 2018. It is now read-only.

Commit

Permalink
Merge pull request #35 from maralla/move_to_start
Browse files Browse the repository at this point in the history
fix move to start bug
  • Loading branch information
lxyu committed Sep 3, 2014
2 parents 8885660 + 12eb98a commit dd4012b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions thriftpy/transport/cytransport.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ cdef class TCyBuffer(object):
self.buf = NULL

cdef void move_to_start(self):
if self.cur != 0 and self.data_size > 0:
memmove(self.buf, self.buf + self.cur, self.data_size)
self.cur = 0
memmove(self.buf, self.buf + self.cur, self.data_size)
self.cur = 0

cdef void clean(self):
self.cur = 0
Expand Down

0 comments on commit dd4012b

Please # to comment.