summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index f3329b5..6f46c7f 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -880,7 +880,7 @@ Py_SetRecursionLimit(int new_limit)
}
}
-/* The function _Py_EnterRecursiveCall() only calls _Py_CheckRecursiveCall()
+/* The function _Py_EnterRecursiveCallTstate() only calls _Py_CheckRecursiveCall()
if the recursion_depth reaches recursion_limit. */
int
_Py_CheckRecursiveCall(PyThreadState *tstate, const char *where)
@@ -1736,7 +1736,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
/* support for generator.throw() */
if (throwflag) {
- if (_Py_EnterRecursiveCall(tstate, "")) {
+ if (_Py_EnterRecursiveCallTstate(tstate, "")) {
tstate->recursion_remaining--;
goto exit_unwind;
}
@@ -1776,7 +1776,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
start_frame:
- if (_Py_EnterRecursiveCall(tstate, "")) {
+ if (_Py_EnterRecursiveCallTstate(tstate, "")) {
tstate->recursion_remaining--;
goto exit_unwind;
}
@@ -2492,7 +2492,7 @@ handle_eval_breaker:
_PyFrame_SetStackPointer(frame, stack_pointer);
TRACE_FUNCTION_EXIT();
DTRACE_FUNCTION_EXIT();
- _Py_LeaveRecursiveCall(tstate);
+ _Py_LeaveRecursiveCallTstate(tstate);
if (!frame->is_entry) {
frame = cframe.current_frame = pop_frame(tstate, frame);
_PyFrame_StackPush(frame, retval);
@@ -2704,7 +2704,7 @@ handle_eval_breaker:
_PyFrame_SetStackPointer(frame, stack_pointer);
TRACE_FUNCTION_EXIT();
DTRACE_FUNCTION_EXIT();
- _Py_LeaveRecursiveCall(tstate);
+ _Py_LeaveRecursiveCallTstate(tstate);
/* Restore previous cframe and return. */
tstate->cframe = cframe.previous;
tstate->cframe->use_tracing = cframe.use_tracing;
@@ -5066,12 +5066,12 @@ handle_eval_breaker:
PyCFunction cfunc = PyCFunction_GET_FUNCTION(callable);
// This is slower but CPython promises to check all non-vectorcall
// function calls.
- if (_Py_EnterRecursiveCall(tstate, " while calling a Python object")) {
+ if (_Py_EnterRecursiveCallTstate(tstate, " while calling a Python object")) {
goto error;
}
PyObject *arg = TOP();
PyObject *res = cfunc(PyCFunction_GET_SELF(callable), arg);
- _Py_LeaveRecursiveCall(tstate);
+ _Py_LeaveRecursiveCallTstate(tstate);
assert((res != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
Py_DECREF(arg);
@@ -5268,11 +5268,11 @@ handle_eval_breaker:
PyCFunction cfunc = meth->ml_meth;
// This is slower but CPython promises to check all non-vectorcall
// function calls.
- if (_Py_EnterRecursiveCall(tstate, " while calling a Python object")) {
+ if (_Py_EnterRecursiveCallTstate(tstate, " while calling a Python object")) {
goto error;
}
PyObject *res = cfunc(self, arg);
- _Py_LeaveRecursiveCall(tstate);
+ _Py_LeaveRecursiveCallTstate(tstate);
assert((res != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
Py_DECREF(self);
Py_DECREF(arg);
@@ -5340,11 +5340,11 @@ handle_eval_breaker:
PyCFunction cfunc = meth->ml_meth;
// This is slower but CPython promises to check all non-vectorcall
// function calls.
- if (_Py_EnterRecursiveCall(tstate, " while calling a Python object")) {
+ if (_Py_EnterRecursiveCallTstate(tstate, " while calling a Python object")) {
goto error;
}
PyObject *res = cfunc(self, NULL);
- _Py_LeaveRecursiveCall(tstate);
+ _Py_LeaveRecursiveCallTstate(tstate);
assert((res != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
Py_DECREF(self);
STACK_SHRINK(oparg + 1);
@@ -5484,7 +5484,7 @@ handle_eval_breaker:
assert(frame->frame_obj == NULL);
gen->gi_frame_state = FRAME_CREATED;
gen_frame->owner = FRAME_OWNED_BY_GENERATOR;
- _Py_LeaveRecursiveCall(tstate);
+ _Py_LeaveRecursiveCallTstate(tstate);
if (!frame->is_entry) {
_PyInterpreterFrame *prev = frame->previous;
_PyThreadState_PopFrame(tstate, frame);
@@ -5850,7 +5850,7 @@ exception_unwind:
exit_unwind:
assert(_PyErr_Occurred(tstate));
- _Py_LeaveRecursiveCall(tstate);
+ _Py_LeaveRecursiveCallTstate(tstate);
if (frame->is_entry) {
/* Restore previous cframe and exit */
tstate->cframe = cframe.previous;
@@ -7955,12 +7955,12 @@ maybe_dtrace_line(_PyInterpreterFrame *frame,
int Py_EnterRecursiveCall(const char *where)
{
- return _Py_EnterRecursiveCall_inline(where);
+ return _Py_EnterRecursiveCall(where);
}
#undef Py_LeaveRecursiveCall
void Py_LeaveRecursiveCall(void)
{
- _Py_LeaveRecursiveCall_inline();
+ _Py_LeaveRecursiveCall();
}