Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apply suggestions from code review
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
  • Loading branch information
scoder and methane authored May 11, 2020
commit c7e07c32d815ddd5fbe90f444d529690afe734c7
3 changes: 1 addition & 2 deletions Objects/dictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1488,12 +1488,11 @@ PyDict_GetItemWithError(PyObject *op, PyObject *key)
PyObject *
_PyDict_GetItemIdWithError(PyObject *dp, struct _Py_Identifier *key)
{
Py_hash_t hash;
PyObject *kv;
kv = _PyUnicode_FromId(key); /* borrowed */
if (kv == NULL)
return NULL;
hash = ((PyASCIIObject *) kv)->hash;
Py_hash_t hash = ((PyASCIIObject *) kv)->hash;
assert (hash != -1); /* interned strings have their hash value initialised */
return _PyDict_GetItem_KnownHash(dp, kv, hash);
}
Expand Down