Skip to content

Commit 45129f8

Browse files
just guessing
1 parent bc861a6 commit 45129f8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Objects/codeobject.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,8 @@ intern_constants(PyObject *tuple, int *modified)
214214
if (PyUnicode_CHECK_INTERNED(v) != 0) {
215215
continue;
216216
}
217-
PyObject *interned;
218217
Py_BEGIN_CRITICAL_SECTION(interned_dict);
219-
interned = PyDict_GetItemWithError(interned_dict, v);
220-
Py_END_CRITICAL_SECTION();
218+
PyObject *interned = PyDict_GetItemWithError(interned_dict, v);
221219
if (interned == NULL && PyErr_Occurred()) {
222220
goto error;
223221
}
@@ -244,6 +242,7 @@ intern_constants(PyObject *tuple, int *modified)
244242
}
245243
}
246244
}
245+
Py_END_CRITICAL_SECTION();
247246
}
248247
else if (PyTuple_CheckExact(v)) {
249248
if (intern_constants(v, NULL) < 0) {

0 commit comments

Comments
 (0)