[Python-checkins] cpython (merge 3.4 -> 3.5): Added the const qualifier for char* argument of Py_EnterRecursiveCall().
serhiy.storchaka
python-checkins at python.org
Sun Jun 21 15:28:12 CEST 2015
https://hg.python.org/cpython/rev/6e2573713da0
changeset: 96632:6e2573713da0
branch: 3.5
parent: 96628:9602b8313dd5
parent: 96630:345d9b7542d9
user: Serhiy Storchaka <storchaka at gmail.com>
date: Sun Jun 21 16:27:09 2015 +0300
summary:
Added the const qualifier for char* argument of Py_EnterRecursiveCall().
files:
Doc/c-api/exceptions.rst | 2 +-
Include/ceval.h | 2 +-
Python/ceval.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst
--- a/Doc/c-api/exceptions.rst
+++ b/Doc/c-api/exceptions.rst
@@ -674,7 +674,7 @@
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
--- a/Include/ceval.h
+++ b/Include/ceval.h
@@ -79,7 +79,7 @@
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
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -712,7 +712,7 @@
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();
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list