mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-20 04:13:16 +00:00
parent
c3995669f1
commit
b82d0b62f1
2 changed files with 9 additions and 1 deletions
|
@ -814,7 +814,7 @@ class Packer(object):
|
|||
self._pack_raw_header(n)
|
||||
return self._buffer.write(obj)
|
||||
if check(obj, memoryview):
|
||||
n = len(obj) * obj.itemsize
|
||||
n = obj.nbytes
|
||||
if n >= 2**32:
|
||||
raise ValueError("Memoryview is too large")
|
||||
self._pack_bin_header(n)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue