Skip to content

Commit e404ece

Browse files
committed
Add missing critical sections
1 parent c6f3c86 commit e404ece

File tree

2 files changed

+30
-10
lines changed

2 files changed

+30
-10
lines changed

Objects/clinic/frameobject.c.h

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

Objects/frameobject.c

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,6 +1079,7 @@ frame_back_get_impl(PyFrameObject *self)
10791079
}
10801080

10811081
/*[clinic input]
1082+
@critical_section
10821083
@getter
10831084
frame.f_trace_opcodes as frame_trace_opcodes
10841085
@@ -1087,19 +1088,20 @@ Return True if opcode tracing is enabled, False otherwise.
10871088

10881089
static PyObject *
10891090
frame_trace_opcodes_get_impl(PyFrameObject *self)
1090-
/*[clinic end generated code: output=53ff41d09cc32e87 input=1ce9af95c28e903f]*/
1091+
/*[clinic end generated code: output=53ff41d09cc32e87 input=4eb91dc88e04677a]*/
10911092
{
10921093
return self->f_trace_opcodes ? Py_True : Py_False;
10931094
}
10941095

10951096
/*[clinic input]
1097+
@critical_section
10961098
@setter
10971099
frame.f_trace_opcodes as frame_trace_opcodes
10981100
[clinic start generated code]*/
10991101

11001102
static int
11011103
frame_trace_opcodes_set_impl(PyFrameObject *self, PyObject *value)
1102-
/*[clinic end generated code: output=92619da2bfccd449 input=0b0f3df0ef997359]*/
1104+
/*[clinic end generated code: output=92619da2bfccd449 input=7e286eea3c0333ff]*/
11031105
{
11041106
if (!PyBool_Check(value)) {
11051107
PyErr_SetString(PyExc_TypeError,
@@ -1793,6 +1795,7 @@ frame_lineno_set_impl(PyFrameObject *self, PyObject *value)
17931795
}
17941796

17951797
/*[clinic input]
1798+
@critical_section
17961799
@getter
17971800
frame.f_trace as frame_trace
17981801
@@ -1801,7 +1804,7 @@ Return the trace function for this frame, or None if no trace function is set.
18011804

18021805
static PyObject *
18031806
frame_trace_get_impl(PyFrameObject *self)
1804-
/*[clinic end generated code: output=5475cbfce07826cd input=7b47c6f37b8ad405]*/
1807+
/*[clinic end generated code: output=5475cbfce07826cd input=f382612525829773]*/
18051808
{
18061809
PyObject* trace = self->f_trace;
18071810
if (trace == NULL) {
@@ -1811,13 +1814,14 @@ frame_trace_get_impl(PyFrameObject *self)
18111814
}
18121815

18131816
/*[clinic input]
1817+
@critical_section
18141818
@setter
18151819
frame.f_trace as frame_trace
18161820
[clinic start generated code]*/
18171821

18181822
static int
18191823
frame_trace_set_impl(PyFrameObject *self, PyObject *value)
1820-
/*[clinic end generated code: output=d6fe08335cf76ae4 input=3476aee610ee0aef]*/
1824+
/*[clinic end generated code: output=d6fe08335cf76ae4 input=d96a18bda085707f]*/
18211825
{
18221826
if (value == Py_None) {
18231827
value = NULL;
@@ -2355,21 +2359,21 @@ PyObject*
23552359
PyFrame_GetLocals(PyFrameObject *frame)
23562360
{
23572361
assert(!_PyFrame_IsIncomplete(frame->f_frame));
2358-
return frame_locals_get_impl(frame);
2362+
return frame_locals_get(frame, NULL);
23592363
}
23602364

23612365
PyObject*
23622366
PyFrame_GetGlobals(PyFrameObject *frame)
23632367
{
23642368
assert(!_PyFrame_IsIncomplete(frame->f_frame));
2365-
return frame_globals_get_impl(frame);
2369+
return frame_globals_get(frame, NULL);
23662370
}
23672371

23682372
PyObject*
23692373
PyFrame_GetBuiltins(PyFrameObject *frame)
23702374
{
23712375
assert(!_PyFrame_IsIncomplete(frame->f_frame));
2372-
return frame_builtins_get_impl(frame);
2376+
return frame_builtins_get(frame, NULL);
23732377
}
23742378

23752379
int

0 commit comments

Comments
 (0)