mirror of https://github.com/python/cpython
Added the const qualifier for char* argument of Py_EnterRecursiveCall().
This commit is contained in:
commit
289dd19124
|
@ -674,7 +674,7 @@ level, both in the core and in extension modules. They are needed if the
|
|||
recursive code does not necessarily invoke Python code (which tracks its
|
||||
recursion depth automatically).
|
||||
|
||||
.. c:function:: int Py_EnterRecursiveCall(char *where)
|
||||
.. c:function:: int Py_EnterRecursiveCall(const char *where)
|
||||
|
||||
Marks a point where a recursive C-level call is about to be performed.
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ PyAPI_FUNC(int) Py_GetRecursionLimit(void);
|
|||
do{ if(_Py_MakeEndRecCheck(PyThreadState_GET()->recursion_depth)) \
|
||||
PyThreadState_GET()->overflowed = 0; \
|
||||
} while(0)
|
||||
PyAPI_FUNC(int) _Py_CheckRecursiveCall(char *where);
|
||||
PyAPI_FUNC(int) _Py_CheckRecursiveCall(const char *where);
|
||||
PyAPI_DATA(int) _Py_CheckRecursionLimit;
|
||||
|
||||
#ifdef USE_STACKCHECK
|
||||
|
|
|
@ -712,7 +712,7 @@ Py_SetRecursionLimit(int new_limit)
|
|||
to guarantee that _Py_CheckRecursiveCall() is regularly called.
|
||||
Without USE_STACKCHECK, there is no need for this. */
|
||||
int
|
||||
_Py_CheckRecursiveCall(char *where)
|
||||
_Py_CheckRecursiveCall(const char *where)
|
||||
{
|
||||
PyThreadState *tstate = PyThreadState_GET();
|
||||
|
||||
|
|
Loading…
Reference in New Issue