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

Commit

Permalink
Merge pull request #212 from jparise/c-read-string
Browse files Browse the repository at this point in the history
Tell c_read_binary that it's decoding characters
  • Loading branch information
lxyu authored Jun 28, 2016
2 parents ec10dca + 724ebfa commit 073ec0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thriftpy/protocol/cybin/cybin.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ cdef inline c_read_binary(CyTransportBase buf, int32_t size):
cdef inline c_read_string(CyTransportBase buf, int32_t size):
py_data = c_read_binary(buf, size)
try:
return py_data.decode("utf-8")
return (<char *>py_data)[:size].decode("utf-8")
except:
return py_data

Expand Down

0 comments on commit 073ec0b

Please sign in to comment.