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 903cc96 commit 9ec2e09Copy full SHA for 9ec2e09
Objects/codeobject.c
@@ -214,15 +214,10 @@ intern_constants(PyObject *tuple, int *modified)
214
continue;
215
}
216
#if !defined(Py_GIL_DISABLED)
217
- PyObject *interned = PyDict_GetItemWithError(interned_dict, v);
218
- if (interned == NULL && PyErr_Occurred()) {
219
- goto error;
220
- }
221
- if (!interned) {
222
- interned = (PyObject *)_Py_hashtable_get(INTERNED_STRINGS, v);
223
224
225
+ PyObject *interned = _Py_hashtable_get(INTERNED_STRINGS, v);
+ if (interned == NULL) {
+ interned = PyDict_GetItemWithError(interned_dict, v);
+ if (PyErr_Occurred()) goto error;
226
227
if (interned != NULL && interned != v) {
228
Py_INCREF(interned);
0 commit comments