@@ -94,13 +94,8 @@ PyAPI_FUNC(int) Py_MakePendingCalls(void);
9494PyAPI_FUNC (void ) Py_SetRecursionLimit (int );
9595PyAPI_FUNC (int ) Py_GetRecursionLimit (void );
9696
97- #define Py_EnterRecursiveCall (where ) \
98- (_Py_MakeRecCheck(PyThreadState_GET()->recursion_depth) && \
99- _Py_CheckRecursiveCall(where))
100- #define Py_LeaveRecursiveCall () \
101- do{ if(_Py_MakeEndRecCheck(PyThreadState_GET()->recursion_depth)) \
102- PyThreadState_GET()->overflowed = 0; \
103- } while(0)
97+ #define Py_EnterRecursiveCall (where ) 0
98+ #define Py_LeaveRecursiveCall ()
10499PyAPI_FUNC (int ) _Py_CheckRecursiveCall (const char * where );
105100
106101/* Due to the macros in which it's used, _Py_CheckRecursionLimit is in
@@ -130,13 +125,9 @@ PyAPI_DATA(int) _Py_CheckRecursionLimit;
130125#define _Py_MakeEndRecCheck (x ) \
131126 (--(x) < _Py_RecursionLimitLowerWaterMark(_Py_CheckRecursionLimit))
132127
133- #define Py_ALLOW_RECURSION \
134- do { unsigned char _old = PyThreadState_GET()->recursion_critical;\
135- PyThreadState_GET()->recursion_critical = 1;
128+ #define Py_ALLOW_RECURSION
136129
137- #define Py_END_ALLOW_RECURSION \
138- PyThreadState_GET()->recursion_critical = _old; \
139- } while(0);
130+ #define Py_END_ALLOW_RECURSION
140131
141132PyAPI_FUNC (const char * ) PyEval_GetFuncName (PyObject * );
142133PyAPI_FUNC (const char * ) PyEval_GetFuncDesc (PyObject * );
0 commit comments