mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-23 05:43:17 +00:00
Added support of bytearrays to msgpack/fallback.py
This commit is contained in:
parent
d5436c2819
commit
48ca2d700d
2 changed files with 9 additions and 0 deletions
|
|
@ -193,6 +193,8 @@ class Unpacker(object):
|
|||
def feed(self, next_bytes):
|
||||
if isinstance(next_bytes, array.array):
|
||||
next_bytes = next_bytes.tostring()
|
||||
elif isinstance(next_bytes, bytearray):
|
||||
next_bytes = str(next_bytes)
|
||||
assert self._fb_feeding
|
||||
if self._fb_buf_n + len(next_bytes) > self._max_buffer_size:
|
||||
raise BufferFull
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue