mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-19 20:03:16 +00:00
parent
e419cd8e2d
commit
2c6668941f
2 changed files with 5 additions and 0 deletions
|
@ -192,6 +192,9 @@ static inline int unpack_callback_map_item(unpack_user* u, unsigned int current,
|
|||
PyErr_Format(PyExc_ValueError, "%.100s is not allowed for map key", Py_TYPE(k)->tp_name);
|
||||
return -1;
|
||||
}
|
||||
if (PyUnicode_CheckExact(k)) {
|
||||
PyUnicode_InternInPlace(&k);
|
||||
}
|
||||
if (u->has_pairs_hook) {
|
||||
msgpack_unpack_object item = PyTuple_Pack(2, k, v);
|
||||
if (!item)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue