mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-41936. Remove macros Py_ALLOW_RECURSION/Py_END_ALLOW_RECURSION (GH-22552)
This commit is contained in:
parent
9a7642667a
commit
dcc54215ac
6 changed files with 8 additions and 14 deletions
|
@ -67,14 +67,6 @@ PyAPI_FUNC(int) Py_GetRecursionLimit(void);
|
|||
PyAPI_FUNC(int) Py_EnterRecursiveCall(const char *where);
|
||||
PyAPI_FUNC(void) Py_LeaveRecursiveCall(void);
|
||||
|
||||
#define Py_ALLOW_RECURSION \
|
||||
do { unsigned char _old = PyThreadState_GET()->recursion_critical;\
|
||||
PyThreadState_GET()->recursion_critical = 1;
|
||||
|
||||
#define Py_END_ALLOW_RECURSION \
|
||||
PyThreadState_GET()->recursion_critical = _old; \
|
||||
} while(0);
|
||||
|
||||
PyAPI_FUNC(const char *) PyEval_GetFuncName(PyObject *);
|
||||
PyAPI_FUNC(const char *) PyEval_GetFuncDesc(PyObject *);
|
||||
|
||||
|
|
|
@ -56,8 +56,6 @@ struct _ts {
|
|||
int recursion_depth;
|
||||
char overflowed; /* The stack has overflowed. Allow 50 more calls
|
||||
to handle the runtime error. */
|
||||
char recursion_critical; /* The current calls must not cause
|
||||
a stack overflow. */
|
||||
int stackcheck_counter;
|
||||
|
||||
/* 'tracing' keeps track of the execution depth when tracing/profiling.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue