8000 Added the const qualifier for char* argument of Py_EnterRecursiveCall(). · python/cpython@1670af6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1670af6

Browse files
Added the const qualifier for char* argument of Py_EnterRecursiveCall().
1 parent 18d69e0 commit 1670af6

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
@@ -493,7 +493,7 @@ level, both in the core and in extension modules. They are needed if the
493493
recursive code does not necessarily invoke Python code (which tracks its
494494
recursion depth automatically).
495495
496-
.. c:function:: int Py_EnterRecursiveCall(char *where)
496+
.. c:function:: int Py_EnterRecursiveCall(const char *where)
497497
498498
Marks a point where a recursive C-level call is about to be performed.
499499

Include/ceval.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ PyAPI_FUNC(int) Py_GetRecursionLimit(void);
5050
_Py_CheckRecursiveCall(where))
5151
#define Py_LeaveRecursiveCall() \
5252
(--PyThreadState_GET()->recursion_depth)
53-
PyAPI_FUNC(int) _Py_CheckRecursiveCall(char *where);
53+
PyAPI_FUNC(int) _Py_CheckRecursiveCall(const char *where);
5454
PyAPI_DATA(int) _Py_CheckRecursionLimit;
5555
#ifdef USE_STACKCHECK
5656
# define _Py_MakeRecCheck(x) (++(x) > --_Py_CheckRecursionLimit)

Python/ceval.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ Py_SetRecursionLimit(int new_limit)
615615
to guarantee that _Py_CheckRecursiveCall() is regularly called.
616616
Without USE_STACKCHECK, there is no need for this. */
617617
int
618-
_Py_CheckRecursiveCall(char *where)
618+
_Py_CheckRecursiveCall(const char *where)
619619
{
620620
PyThreadState *tstate = PyThreadState_GET();
621621

0 commit comments

Comments
 (0)
0