]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added the const qualifier for char* argument of Py_EnterRecursiveCall().
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 21 Jun 2015 13:26:28 +0000 (16:26 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Sun, 21 Jun 2015 13:26:28 +0000 (16:26 +0300)
Doc/c-api/exceptions.rst
Include/ceval.h
Python/ceval.c

index 66b7752661d2e69a5af719231d6036e45d976157..d89c31c0df9e54ea9530a8aa72ccf4040bde6439 100644 (file)
@@ -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.
 
index 6811367d7625fbaf7f9602aa517fed5e540a01e0..4937f2c431added9f7bbd4e17509aedf4a47341c 100644 (file)
@@ -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
index 7656b8ef540794641df5a51c22c4c9c2af51351f..275229858e220a3412d2b42fdad01bef13e4f614 100644 (file)
@@ -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();