]> granicus.if.org Git - python/commitdiff
Issue #26476: Fixed compilation error when use PyErr_BadInternalCall() in C++.
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 3 Mar 2016 16:16:27 +0000 (18:16 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Thu, 3 Mar 2016 16:16:27 +0000 (18:16 +0200)
Patch by Jeroen Demeyer.

Include/pyerrors.h
Misc/NEWS
Python/errors.c

index 2ef205ea4bcdb33f1ca532bc1eb3bab07cd278b6..51134ef7b2522db84a44c8033bdd037dfa41c034 100644 (file)
@@ -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__)
index ac564b771796413db844d19c298e7980c7799b69..51220c3275f52fda8b806cb975eb4bb839d512c9 100644 (file)
--- 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?
 ============================
index e7c221c59de4a30dbd250c1d2235a3340a4beabb..d823e1397ccb6a56778f2d4be70965fa887e3d80 100644 (file)
@@ -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",