8000 Remove clinic critical section directives for `_weakref` module · python/cpython@37076b5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 37076b5

Browse files
committed
Remove clinic critical section directives for _weakref module
Locking is handled in the implementation
1 parent d998d1b commit 37076b5

File tree

2 files changed

+4
-24
lines changed

2 files changed

+4
-24
lines changed

Modules/_weakref.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ module _weakref
1414
#include "clinic/_weakref.c.h"
1515

1616
/*[clinic input]
17-
@critical_section object
1817
_weakref.getweakrefcount -> Py_ssize_t
1918
2019
object: object
@@ -25,7 +24,7 @@ Return the number of weak references to 'object'.
2524

2625
static Py_ssize_t
2726
_weakref_getweakrefcount_impl(PyObject *module, PyObject *object)
28-
/*[clinic end generated code: output=301806d59558ff3e input=6535a580f1d0ebdc]*/
27+
/*[clinic end generated code: output=301806d59558ff3e input=7d4d04fcaccf64d5]*/
2928
{
3029
if (!_PyType_SUPPORTS_WEAKREFS(Py_TYPE(object))) {
3130
return 0;
@@ -75,7 +74,6 @@ _weakref__remove_dead_weakref_impl(PyObject *module, PyObject *dct,
7574

7675

7776
/*[clinic input]
78-
@critical_section object
7977
_weakref.getweakrefs
8078
object: object
8179
/
@@ -84,8 +82,8 @@ Return a list of all weak reference objects pointing to 'object'.
8482
[clinic start generated code]*/
8583

8684
static PyObject *
87-
_weakref_getweakrefs_impl(PyObject *module, PyObject *object)
88-
/*[clinic end generated code: output=5ec268989fb8f035 input=3dea95b8f5b31bbb]*/
85+
_weakref_getweakrefs(PyObject *module, PyObject *object)
86+
/*[clinic end generated code: output=25c7731d8e011824 input=00c6d0e5d3206693]*/
8987
{
9088
if (!_PyType_SUPPORTS_WEAKREFS(Py_TYPE(object))) {
9189
return PyList_New(0);

Modules/clinic/_weakref.c.h

Lines changed: 1 addition & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0