mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
else if
This commit is contained in:
parent
30b0c6c507
commit
887f102a7b
2 changed files with 2 additions and 3 deletions
|
|
@ -529,7 +529,7 @@ class Unpacker:
|
|||
raise ValueError("%s is not allowed for map key" % str(type(key)))
|
||||
if isinstance(key, str):
|
||||
key = sys.intern(key)
|
||||
if isinstance(key, list):
|
||||
elif isinstance(key, list):
|
||||
key = tuple(key)
|
||||
ret[key] = self._unpack(EX_CONSTRUCT)
|
||||
if self._object_hook is not None:
|
||||
|
|
|
|||
|
|
@ -198,8 +198,7 @@ static inline int unpack_callback_map_item(unpack_user* u, unsigned int current,
|
|||
}
|
||||
if (PyUnicode_CheckExact(k)) {
|
||||
PyUnicode_InternInPlace(&k);
|
||||
}
|
||||
if (PyList_CheckExact(k)) {
|
||||
} else if (PyList_CheckExact(k)) {
|
||||
Py_ssize_t list_size = PyList_Size(k);
|
||||
PyObject* tuple = PyTuple_New(list_size);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue