From 73c95f194975a9a6226f3f6fd87352e7337a20dd Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 21 Jun 2015 15:59:46 +0300 Subject: Issue #24436: Added const qualifiers for char* arguments of _PyTraceback_Add. Patch by Michael Ensslin. --- Include/traceback.h | 2 +- Python/traceback.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Include/traceback.h b/Include/traceback.h index 12d467a..891000c 100644 --- a/Include/traceback.h +++ b/Include/traceback.h @@ -24,7 +24,7 @@ PyAPI_FUNC(int) PyTraceBack_Here(struct _frame *); PyAPI_FUNC(int) PyTraceBack_Print(PyObject *, PyObject *); #ifndef Py_LIMITED_API PyAPI_FUNC(int) _Py_DisplaySourceLine(PyObject *, PyObject *, int, int); -PyAPI_FUNC(void) _PyTraceback_Add(char *, char *, int); +PyAPI_FUNC(void) _PyTraceback_Add(const char *, const char *, int); #endif /* Reveal traceback type so we can typecheck traceback objects */ diff --git a/Python/traceback.c b/Python/traceback.c index 2bea29e..7d1fc2e 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -143,7 +143,7 @@ PyTraceBack_Here(PyFrameObject *frame) } /* Insert a frame into the traceback for (funcname, filename, lineno). */ -void _PyTraceback_Add(char *funcname, char *filename, int lineno) +void _PyTraceback_Add(const char *funcname, const char *filename, int lineno) { PyObject *globals = NULL; PyCodeObject *code = NULL; -- cgit v0.12