summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-03-03 18:16:27 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2016-03-03 18:16:27 +0200
commita63c8bc1232bcb82b4612996842c953e434c1b09 (patch)
treed7fba41f57e399d77a0b1b268bedfee6b9949827
parent1e2297434a17be6cb014d4eafff2d9545d48bf9d (diff)
downloadpython-a63c8bc1232bcb82b4612996842c953e434c1b09.tar.gz
Issue #26476: Fixed compilation error when use PyErr_BadInternalCall() in C++.
Patch by Jeroen Demeyer.
-rw-r--r--Include/pyerrors.h2
-rw-r--r--Misc/NEWS6
-rw-r--r--Python/errors.c2
3 files changed, 8 insertions, 2 deletions
diff --git a/Include/pyerrors.h b/Include/pyerrors.h
index 2ef205ea4b..51134ef7b2 100644
--- a/Include/pyerrors.h
+++ b/Include/pyerrors.h
@@ -215,7 +215,7 @@ PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErr(PyObject *, int);
/* Export the old function so that the existing API remains available: */
PyAPI_FUNC(void) PyErr_BadInternalCall(void);
-PyAPI_FUNC(void) _PyErr_BadInternalCall(char *filename, int lineno);
+PyAPI_FUNC(void) _PyErr_BadInternalCall(const char *filename, int lineno);
/* Mask the old API with a call to the new API for code compiled under
Python 2.0: */
#define PyErr_BadInternalCall() _PyErr_BadInternalCall(__FILE__, __LINE__)
diff --git a/Misc/NEWS b/Misc/NEWS
index ac564b7717..51220c3275 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -174,6 +174,12 @@ Build
- Issue #25136: Support Apple Xcode 7's new textual SDK stub libraries.
+C API
+-----
+
+- Issue #26476: Fixed compilation error when use PyErr_BadInternalCall() in C++.
+ Patch by Jeroen Demeyer.
+
What's New in Python 2.7.11?
============================
diff --git a/Python/errors.c b/Python/errors.c
index e7c221c59d..d823e1397c 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -532,7 +532,7 @@ PyObject *PyErr_SetFromWindowsErrWithUnicodeFilename(
#endif /* MS_WINDOWS */
void
-_PyErr_BadInternalCall(char *filename, int lineno)
+_PyErr_BadInternalCall(const char *filename, int lineno)
{
PyErr_Format(PyExc_SystemError,
"%s:%d: bad argument to internal function",