We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68d62bf commit 83424bdCopy full SHA for 83424bd
msgpack/_packer.pyx
@@ -174,11 +174,11 @@ cdef class Packer(object):
174
o = PyUnicode_AsEncodedString(o, self.encoding, self.unicode_errors)
175
L = len(o)
176
if L > (2**32)-1:
177
- raise ValueError("dict is too large")
+ raise ValueError("unicode string is too large")
178
rawval = o
179
- ret = msgpack_pack_raw(&self.pk, len(o))
+ ret = msgpack_pack_raw(&self.pk, L)
180
if ret == 0:
181
- ret = msgpack_pack_raw_body(&self.pk, rawval, len(o))
+ ret = msgpack_pack_raw_body(&self.pk, rawval, L)
182
elif PyDict_CheckExact(o):
183
d = <dict>o
184
L = len(d)
0 commit comments