From: Serhiy Storchaka Date: Sun, 21 Jun 2015 13:26:28 +0000 (+0300) Subject: Added the const qualifier for char* argument of Py_EnterRecursiveCall(). X-Git-Tag: v3.5.0b3~59^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5fa22fc088ac44c5652107c7c17cda01eaa84a28;p=thirdparty%2FPython%2Fcpython.git Added the const qualifier for char* argument of Py_EnterRecursiveCall(). --- diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst index 66b7752661d2..d89c31c0df9e 100644 --- a/Doc/c-api/exceptions.rst +++ b/Doc/c-api/exceptions.rst @@ -621,7 +621,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 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. diff --git a/Include/ceval.h b/Include/ceval.h index 6811367d7625..4937f2c431ad 100644 --- a/Include/ceval.h +++ b/Include/ceval.h @@ -77,7 +77,7 @@ PyAPI_FUNC(int) Py_GetRecursionLimit(void); do{ if(_Py_MakeEndRecCheck(PyThreadState_GET()->recursion_depth)) \ PyThreadState_GET()->overflowed = 0; \ } while(0) -PyAPI_FUNC(int) _Py_CheckRecursiveCall(char *where); +PyAPI_FUNC(int) _Py_CheckRecursiveCall(const char *where); PyAPI_DATA(int) _Py_CheckRecursionLimit; #ifdef USE_STACKCHECK diff --git a/Python/ceval.c b/Python/ceval.c index 7656b8ef5407..275229858e22 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -710,7 +710,7 @@ Py_SetRecursionLimit(int new_limit) to guarantee that _Py_CheckRecursiveCall() is regularly called. Without USE_STACKCHECK, there is no need for this. */ int -_Py_CheckRecursiveCall(char *where) +_Py_CheckRecursiveCall(const char *where) { PyThreadState *tstate = PyThreadState_GET();