Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 289dd19

Browse files
Added the const qualifier for char* argument of Py_EnterRecursiveCall().
2 parents ccfdf09 + 5fa22fc commit 289dd19

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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)