We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b691a8e commit 1406cd4Copy full SHA for 1406cd4
1 file changed
msgpack/_packer.pyx
@@ -291,6 +291,10 @@ cdef class Packer:
291
raise ValueError("ext data too large")
292
msgpack_pack_ext(&self.pk, typecode, len(data))
293
msgpack_pack_raw_body(&self.pk, data, len(data))
294
+ if self.autoreset:
295
+ buf = PyBytes_FromStringAndSize(self.pk.buf, self.pk.length)
296
+ self.pk.length = 0
297
+ return buf
298
299
@cython.critical_section
300
def pack_array_header(self, long long size):
0 commit comments