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 8e91b7b commit 59f908fCopy full SHA for 59f908f
Modules/_weakref.c
@@ -1,5 +1,4 @@
1
#include "Python.h"
2
-#include "pycore_critical_section.h" // Py_BEGIN_CRITICAL_SECTION()
3
#include "pycore_dict.h" // _PyDict_DelItemIf()
4
#include "pycore_object.h" // _PyObject_GET_WEAKREFS_LISTPTR()
5
#include "pycore_weakref.h" // _PyWeakref_IS_DEAD()
@@ -44,11 +43,7 @@ is_dead_weakref(PyObject *value)
44
43
PyErr_SetString(PyExc_TypeError, "not a weakref");
45
return -1;
46
}
47
- int is_dead;
48
- Py_BEGIN_CRITICAL_SECTION(value);
49
- is_dead = _PyWeakref_IS_DEAD(value);
50
- Py_END_CRITICAL_SECTION();
51
- return is_dead;
+ return _PyWeakref_IS_DEAD(value);
52
53
54
/*[clinic input]
0 commit comments