Skip to content

Commit eeb0e4d

Browse files
committed
Change _PyFrameIsExecuting to _PyFrame_IsExecuting for improved legibility.
1 parent fe00513 commit eeb0e4d

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Include/cpython/frameobject.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ struct _frame {
4949
PyObject *f_localsplus[1]; /* locals+stack, dynamically sized */
5050
};
5151

52-
static inline int _PyFrameIsRunnable(struct _frame *f) {
52+
static inline int _PyFrame_IsExecutingRunnable(struct _frame *f) {
5353
return f->f_state < FRAME_EXECUTING;
5454
}
5555

56-
static inline int _PyFrameIsExecuting(struct _frame *f) {
56+
static inline int _PyFrame_IsExecuting(struct _frame *f) {
5757
return f->f_state == FRAME_EXECUTING;
5858
}
5959

Modules/_xxsubinterpretersmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1847,7 +1847,7 @@ _is_running(PyInterpreterState *interp)
18471847
return 0;
18481848
}
18491849

1850-
int executing = _PyFrameIsExecuting(frame);
1850+
int executing = _PyFrame_IsExecuting(frame);
18511851
Py_DECREF(frame);
18521852

18531853
return executing;

Objects/frameobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ frame_tp_clear(PyFrameObject *f)
683683
static PyObject *
684684
frame_clear(PyFrameObject *f, PyObject *Py_UNUSED(ignored))
685685
{
686-
if (_PyFrameIsExecuting(f)) {
686+
if (_PyFrame_IsExecuting(f)) {
687687
PyErr_SetString(PyExc_RuntimeError,
688688
"cannot clear an executing frame");
689689
return NULL;

Objects/genobject.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ gen_send_ex(PyGenObject *gen, PyObject *arg, int exc, int closing)
143143
PyFrameObject *f = gen->gi_frame;
144144
PyObject *result;
145145

146-
if (f != NULL && _PyFrameIsExecuting(f)) {
146+
if (f != NULL && _PyFrame_IsExecuting(f)) {
147147
const char *msg = "generator already executing";
148148
if (PyCoro_CheckExact(gen)) {
149149
msg = "coroutine already executing";
@@ -715,7 +715,7 @@ gen_getrunning(PyGenObject *gen, void *Py_UNUSED(ignored))
715715
Py_INCREF(Py_False);
716716
return Py_False;
717717
}
718-
return PyBool_FromLong(_PyFrameIsExecuting(gen->gi_frame));
718+
return PyBool_FromLong(_PyFrame_IsExecuting(gen->gi_frame));
719719
}
720720

721721
static PyGetSetDef gen_getsetlist[] = {
@@ -944,7 +944,7 @@ cr_getrunning(PyCoroObject *coro, void *Py_UNUSED(ignored))
944944
Py_INCREF(Py_False);
945945
return Py_False;
946946
}
947-
return PyBool_FromLong(_PyFrameIsExecuting(coro->cr_frame));
947+
return PyBool_FromLong(_PyFrame_IsExecuting(coro->cr_frame));
948948
}
949949

950950
static PyGetSetDef coro_getsetlist[] = {

0 commit comments

Comments
 (0)