@@ -1183,7 +1183,7 @@ set_iter(PyObject *so)
11831183static int
11841184set_update_dict_lock_held (PySetObject * so , PyObject * other )
11851185{
1186- assert (PyDict_CheckExact (other ));
1186+ assert (PyAnyDict_CheckExact (other ));
11871187
11881188 _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED (so );
11891189 _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED (other );
@@ -1242,7 +1242,7 @@ set_update_lock_held(PySetObject *so, PyObject *other)
12421242 if (PyAnySet_Check (other )) {
12431243 return set_merge_lock_held (so , other );
12441244 }
1245- else if (PyDict_CheckExact (other )) {
1245+ else if (PyAnyDict_CheckExact (other )) {
12461246 return set_update_dict_lock_held (so , other );
12471247 }
12481248 return set_update_iterable_lock_held (so , other );
@@ -1260,7 +1260,7 @@ set_update_local(PySetObject *so, PyObject *other)
12601260 Py_END_CRITICAL_SECTION ();
12611261 return rv ;
12621262 }
1263- else if (PyDict_CheckExact (other )) {
1263+ else if (PyAnyDict_CheckExact (other )) {
12641264 int rv ;
12651265 Py_BEGIN_CRITICAL_SECTION (other );
12661266 rv = set_update_dict_lock_held (so , other );
@@ -1283,7 +1283,7 @@ set_update_internal(PySetObject *so, PyObject *other)
12831283 Py_END_CRITICAL_SECTION2 ();
12841284 return rv ;
12851285 }
1286- else if (PyDict_CheckExact (other )) {
1286+ else if (PyAnyDict_CheckExact (other )) {
12871287 int rv ;
12881288 Py_BEGIN_CRITICAL_SECTION2 (so , other );
12891289 rv = set_update_dict_lock_held (so , other );
@@ -2030,7 +2030,7 @@ set_difference(PySetObject *so, PyObject *other)
20302030 if (PyAnySet_Check (other )) {
20312031 other_size = PySet_GET_SIZE (other );
20322032 }
2033- else if (PyDict_CheckExact (other )) {
2033+ else if (PyAnyDict_CheckExact (other )) {
20342034 other_size = PyDict_GET_SIZE (other );
20352035 }
20362036 else {
@@ -2047,7 +2047,7 @@ set_difference(PySetObject *so, PyObject *other)
20472047 if (result == NULL )
20482048 return NULL ;
20492049
2050- if (PyDict_CheckExact (other )) {
2050+ if (PyAnyDict_CheckExact (other )) {
20512051 while (set_next (so , & pos , & entry )) {
20522052 key = entry -> key ;
20532053 hash = entry -> hash ;
@@ -2238,7 +2238,7 @@ set_symmetric_difference_update_impl(PySetObject *so, PyObject *other)
22382238 }
22392239
22402240 int rv ;
2241- if (PyDict_CheckExact (other )) {
2241+ if (PyAnyDict_CheckExact (other )) {
22422242 Py_BEGIN_CRITICAL_SECTION2 (so , other );
22432243 rv = set_symmetric_difference_update_dict (so , other );
22442244 Py_END_CRITICAL_SECTION2 ();
0 commit comments