Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dcbff7d

Browse files
Added the const qualifier for char* argument of Py_EnterRecursiveCall().
2 parents 86621ae + 289dd19 commit dcbff7d

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/c-api/exceptions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ level, both in the core and in extension modules. They are needed if the
674674
recursive code does not necessarily invoke Python code (which tracks its
675675
recursion depth automatically).
676676
677-
.. c:function:: int Py_EnterRecursiveCall(char *where)
677+
.. c:function:: int Py_EnterRecursiveCall(const char *where)
678678
679679
Marks a point where a recursive C-level call is about to be performed.
680680

Include/ceval.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ PyAPI_FUNC(int) Py_GetRecursionLimit(void);
7979
do{ if(_Py_MakeEndRecCheck(PyThreadState_GET()->recursion_depth)) \
8080
PyThreadState_GET()->overflowed = 0; \
8181
} while(0)
82-
PyAPI_FUNC(int) _Py_CheckRecursiveCall(char *where);
82+
PyAPI_FUNC(int) _Py_CheckRecursiveCall(const char *where);
8383
PyAPI_DATA(int) _Py_CheckRecursionLimit;
8484

8585
#ifdef USE_STACKCHECK

Python/ceval.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ Py_SetRecursionLimit(int new_limit)
712712
to guarantee that _Py_CheckRecursiveCall() is regularly called.
713713
Without USE_STACKCHECK, there is no need for this. */
714714
int
715-
_Py_CheckRecursiveCall(char *where)
715+
_Py_CheckRecursiveCall(const char *where)
716716
{
717717
PyThreadState *tstate = PyThreadState_GET();
718718

0 commit comments

Comments
 (0)