]> granicus.if.org Git - python/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 6f8f243423d770d72770beb3da99a36de01935af..65249e1b819295394dc72eb07f41f1c674b35c68 100644 (file)
@@ -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
 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 0e8bd2ab1137d0c4c29cb149169d1ba70b66bed8..3735f009f93522606239e8a5ef0676b37cf703d1 100644 (file)
@@ -50,7 +50,7 @@ PyAPI_FUNC(int) Py_GetRecursionLimit(void);
              _Py_CheckRecursiveCall(where))
 #define Py_LeaveRecursiveCall()                         \
             (--PyThreadState_GET()->recursion_depth)
-PyAPI_FUNC(int) _Py_CheckRecursiveCall(char *where);
+PyAPI_FUNC(int) _Py_CheckRecursiveCall(const char *where);
 PyAPI_DATA(int) _Py_CheckRecursionLimit;
 #ifdef USE_STACKCHECK
 #  define _Py_MakeRecCheck(x)  (++(x) > --_Py_CheckRecursionLimit)
index 115d2784c8171217d7b6c069a06943fe66e7f7b2..fa9e7e0ee06b85cb498a987ffe580a5f156e7152 100644 (file)
@@ -615,7 +615,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();