File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -1186,9 +1186,11 @@ set_update_dict_lock_held(PySetObject *so, PyObject *other)
11861186 assert (PyAnyDict_CheckExact (other ));
11871187
11881188 _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED (so );
1189+ #ifdef Py_DEBUG
11891190 if (!PyFrozenDict_CheckExact (other )) {
11901191 _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED (other );
11911192 }
1193+ #endif
11921194
11931195 /* Do one big resize at the start, rather than
11941196 * incrementally resizing as we insert new keys. Expect
@@ -2181,9 +2183,11 @@ static int
21812183set_symmetric_difference_update_dict (PySetObject * so , PyObject * other )
21822184{
21832185 _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED (so );
2186+ #ifdef Py_DEBUG
21842187 if (!PyFrozenDict_CheckExact (other )) {
21852188 _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED (other );
21862189 }
2190+ #endif
21872191
21882192 Py_ssize_t pos = 0 ;
21892193 PyObject * key , * value ;
You can’t perform that action at this time.
0 commit comments