Skip to content

Commit 8a1aa13

Browse files
committed
Remove more counters.
1 parent 37098a0 commit 8a1aa13

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

Include/internal/pycore_ceval.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ PyAPI_FUNC(int) _PyEval_MakePendingCalls(PyThreadState *);
4343
# define Py_DEFAULT_RECURSION_LIMIT 1000
4444
#endif
4545

46-
extern int _Py_FinishPendingCalls(PyThreadState *tstate);
46+
extern void _Py_FinishPendingCalls(PyThreadState *tstate);
4747
extern void _PyEval_InitState(PyInterpreterState *);
4848
extern void _PyEval_SignalReceived(void);
4949

Python/ceval_gil.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ _Py_unset_eval_breaker_bit_all(PyInterpreterState *interp, uintptr_t bit)
10051005
_Py_FOR_EACH_TSTATE_END(interp);
10061006
}
10071007

1008-
int
1008+
void
10091009
_Py_FinishPendingCalls(PyThreadState *tstate)
10101010
{
10111011
_Py_AssertHoldsTstate();
@@ -1024,16 +1024,12 @@ _Py_FinishPendingCalls(PyThreadState *tstate)
10241024
#endif
10251025
int called = 0;
10261026
do {
1027-
int res = make_pending_calls_with_count(tstate);
1028-
if (res < 0) {
1027+
if (make_pending_calls(tstate) < 0) {
10291028
PyObject *exc = _PyErr_GetRaisedException(tstate);
10301029
PyErr_BadInternalCall();
10311030
_PyErr_ChainExceptions1(exc);
10321031
_PyErr_Print(tstate);
10331032
}
1034-
if (res != 0) {
1035-
called = 1;
1036-
}
10371033

10381034
npending = _Py_atomic_load_int32_relaxed(&pending->npending);
10391035
if (pending_main != NULL) {
@@ -1045,7 +1041,7 @@ _Py_FinishPendingCalls(PyThreadState *tstate)
10451041
#endif
10461042
} while (npending > 0);
10471043

1048-
return called;
1044+
return;
10491045
}
10501046

10511047
int

0 commit comments

Comments
 (0)