Skip to content

Commit 59f908f

Browse files
committed
nit
1 parent 8e91b7b commit 59f908f

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Modules/_weakref.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#include "Python.h"
2-
#include "pycore_critical_section.h" // Py_BEGIN_CRITICAL_SECTION()
32
#include "pycore_dict.h" // _PyDict_DelItemIf()
43
#include "pycore_object.h" // _PyObject_GET_WEAKREFS_LISTPTR()
54
#include "pycore_weakref.h" // _PyWeakref_IS_DEAD()
@@ -44,11 +43,7 @@ is_dead_weakref(PyObject *value)
4443
PyErr_SetString(PyExc_TypeError, "not a weakref");
4544
return -1;
4645
}
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;
46+
return _PyWeakref_IS_DEAD(value);
5247
}
5348

5449
/*[clinic input]

0 commit comments

Comments
 (0)