Kaydet (Commit) 1670af6c authored tarafından Serhiy Storchaka's avatar Serhiy Storchaka

Added the const qualifier for char* argument of Py_EnterRecursiveCall().

üst 18d69e0e
...@@ -493,7 +493,7 @@ level, both in the core and in extension modules. They are needed if the ...@@ -493,7 +493,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 recursive code does not necessarily invoke Python code (which tracks its
recursion depth automatically). 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. Marks a point where a recursive C-level call is about to be performed.
......
...@@ -50,7 +50,7 @@ PyAPI_FUNC(int) Py_GetRecursionLimit(void); ...@@ -50,7 +50,7 @@ PyAPI_FUNC(int) Py_GetRecursionLimit(void);
_Py_CheckRecursiveCall(where)) _Py_CheckRecursiveCall(where))
#define Py_LeaveRecursiveCall() \ #define Py_LeaveRecursiveCall() \
(--PyThreadState_GET()->recursion_depth) (--PyThreadState_GET()->recursion_depth)
PyAPI_FUNC(int) _Py_CheckRecursiveCall(char *where); PyAPI_FUNC(int) _Py_CheckRecursiveCall(const char *where);
PyAPI_DATA(int) _Py_CheckRecursionLimit; PyAPI_DATA(int) _Py_CheckRecursionLimit;
#ifdef USE_STACKCHECK #ifdef USE_STACKCHECK
# define _Py_MakeRecCheck(x) (++(x) > --_Py_CheckRecursionLimit) # define _Py_MakeRecCheck(x) (++(x) > --_Py_CheckRecursionLimit)
......
...@@ -615,7 +615,7 @@ Py_SetRecursionLimit(int new_limit) ...@@ -615,7 +615,7 @@ Py_SetRecursionLimit(int new_limit)
to guarantee that _Py_CheckRecursiveCall() is regularly called. to guarantee that _Py_CheckRecursiveCall() is regularly called.
Without USE_STACKCHECK, there is no need for this. */ Without USE_STACKCHECK, there is no need for this. */
int int
_Py_CheckRecursiveCall(char *where) _Py_CheckRecursiveCall(const char *where)
{ {
PyThreadState *tstate = PyThreadState_GET(); PyThreadState *tstate = PyThreadState_GET();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment