File tree Expand file tree Collapse file tree 1 file changed +0
-5
lines changed Expand file tree Collapse file tree 1 file changed +0
-5
lines changed Original file line number Diff line number Diff line change 7
7
#include "pycore_modsupport.h" // _PyArg_NoKeywords()
8
8
#include "pycore_object.h" // _PyObject_GC_UNTRACK()
9
9
#include "pycore_pyerrors.h" // _PyErr_Occurred()
10
- #include "pycore_critical_section.h" // Py_BEGIN_CRITICAL_SECTION()
11
10
12
11
13
12
static const char *
@@ -894,15 +893,13 @@ function___annotations___get_impl(PyFunctionObject *self)
894
893
/*[clinic end generated code: output=a4cf4c884c934cbb input=92643d7186c1ad0c]*/
895
894
{
896
895
PyObject * d = NULL ;
897
- Py_BEGIN_CRITICAL_SECTION (self );
898
896
if (self -> func_annotations == NULL &&
899
897
(self -> func_annotate == NULL || !PyCallable_Check (self -> func_annotate ))) {
900
898
self -> func_annotations = PyDict_New ();
901
899
if (self -> func_annotations == NULL )
902
900
return NULL ;
903
901
}
904
902
d = func_get_annotation_dict (self );
905
- Py_END_CRITICAL_SECTION ();
906
903
return Py_XNewRef (d );
907
904
}
908
905
@@ -926,10 +923,8 @@ function___annotations___set_impl(PyFunctionObject *self, PyObject *value)
926
923
"__annotations__ must be set to a dict object" );
927
924
return -1 ;
928
925
}
929
- Py_BEGIN_CRITICAL_SECTION (self );
930
926
Py_XSETREF (self -> func_annotations , Py_XNewRef (value ));
931
927
Py_CLEAR (self -> func_annotate );
932
- Py_END_CRITICAL_SECTION ();
933
928
return 0 ;
934
929
}
935
930
You can’t perform that action at this time.
0 commit comments