diff -ru a/Python/errors.c b/Python/errors.c --- a/Python/errors.c 2015-05-23 18:09:24.000000000 +0200 +++ b/Python/errors.c 2016-03-03 10:24:55.672009294 +0100 @@ -535,7 +535,7 @@ #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", diff -ru a/Include/pyerrors.h b/Include/pyerrors.h --- a/Include/pyerrors.h 2015-05-23 18:09:00.000000000 +0200 +++ b/Include/pyerrors.h 2016-03-03 11:19:41.762752293 +0100 @@ -215,7 +215,7 @@ /* 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__)