Skip to content

Commit 5fa22fc

Browse files
Added the const qualifier for char* argument of Py_EnterRecursiveCall().
1 parent 73c95f1 commit 5fa22fc

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Doc/c-api/exceptions.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ level, both in the core and in extension modules. They are needed if the
621621
recursive code does not necessarily invoke Python code (which tracks its
622622
recursion depth automatically).
623623
624-
.. c:function:: int Py_EnterRecursiveCall(char *where)
624+
.. c:function:: int Py_EnterRecursiveCall(const char *where)
625625
626626
Marks a point where a recursive C-level call is about to be performed.
627627

Include/ceval.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ PyAPI_FUNC(int) Py_GetRecursionLimit(void);
7777
do{ if(_Py_MakeEndRecCheck(PyThreadState_GET()->recursion_depth)) \
7878
PyThreadState_GET()->overflowed = 0; \
7979
} while(0)
80-
PyAPI_FUNC(int) _Py_CheckRecursiveCall(char *where);
80+
PyAPI_FUNC(int) _Py_CheckRecursiveCall(const char *where);
8181
PyAPI_DATA(int) _Py_CheckRecursionLimit;
8282

8383
#ifdef USE_STACKCHECK

Python/ceval.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ Py_SetRecursionLimit(int new_limit)
710710
to guarantee that _Py_CheckRecursiveCall() is regularly called.
711711
Without USE_STACKCHECK, there is no need for this. */
712712
int
713-
_Py_CheckRecursiveCall(char *where)
713+
_Py_CheckRecursiveCall(const char *where)
714714
{
715715
PyThreadState *tstate = PyThreadState_GET();
716716

0 commit comments

Comments
 (0)