summaryrefslogtreecommitdiffstats
path: root/Objects/dictobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r--Objects/dictobject.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 3db7a5e..5d8910f 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -788,6 +788,16 @@ PyDict_GetItemWithError(PyObject *op, PyObject *key)
return ep->me_value;
}
+PyObject *
+_PyDict_GetItemIdWithError(PyObject *dp, struct _Py_Identifier *key)
+{
+ PyObject *kv;
+ kv = _PyUnicode_FromId(key); /* borrowed */
+ if (kv == NULL)
+ return NULL;
+ return PyDict_GetItemWithError(dp, kv);
+}
+
static int
dict_set_item_by_hash_or_entry(register PyObject *op, PyObject *key,
Py_hash_t hash, PyDictEntry *ep, PyObject *value)